diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 73d7011..bf36fbe 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,9 +1,11 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml -.openapi-generator-ignore .travis.yml README.md +docs/AbsolutePath.md +docs/AppType.md +docs/ApplicationContent.md docs/ApplicationEnvVars.md docs/ApplicationProviderSpec.md docs/ApplicationStatusType.md @@ -54,6 +56,7 @@ docs/DeviceUpdatedStatusType.md docs/DevicesSummary.md docs/DiskResourceMonitorSpec.md docs/DisruptionBudget.md +docs/EncodingType.md docs/EnrollmentConfig.md docs/EnrollmentRequest.md docs/EnrollmentRequestApproval.md @@ -65,6 +68,8 @@ docs/EnrollmentService.md docs/EnrollmentServiceAuth.md docs/EnrollmentServiceService.md docs/EnrollmentrequestApi.md +docs/FileContent.md +docs/FileMetadata.md docs/FileOperation.md docs/FileSpec.md docs/Fleet.md @@ -85,16 +90,19 @@ docs/HttpConfig.md docs/HttpConfigProviderSpec.md docs/HttpConfigProviderSpecHttpRef.md docs/HttpRepoSpec.md -docs/ImageApplicationProvider.md +docs/ImageApplicationProviderSpec.md +docs/InlineApplicationProviderSpec.md docs/InlineConfigProviderSpec.md docs/KubernetesSecretProviderSpec.md docs/KubernetesSecretProviderSpecSecretRef.md docs/LabelSelector.md +docs/LabelsApi.md docs/ListMeta.md docs/MatchExpression.md docs/MemoryResourceMonitorSpec.md docs/ObjectMeta.md docs/PatchRequestInner.md +docs/RelativePath.md docs/RepoSpecType.md docs/Repository.md docs/RepositoryApi.md @@ -130,6 +138,7 @@ flightctl/api/certificatesigningrequest_api.py flightctl/api/device_api.py flightctl/api/enrollmentrequest_api.py flightctl/api/fleet_api.py +flightctl/api/labels_api.py flightctl/api/repository_api.py flightctl/api/resourcesync_api.py flightctl/api/version_api.py @@ -138,6 +147,9 @@ flightctl/api_response.py flightctl/configuration.py flightctl/exceptions.py flightctl/models/__init__.py +flightctl/models/absolute_path.py +flightctl/models/app_type.py +flightctl/models/application_content.py flightctl/models/application_env_vars.py flightctl/models/application_provider_spec.py flightctl/models/application_status_type.py @@ -185,6 +197,7 @@ flightctl/models/device_updated_status_type.py flightctl/models/devices_summary.py flightctl/models/disk_resource_monitor_spec.py flightctl/models/disruption_budget.py +flightctl/models/encoding_type.py flightctl/models/enrollment_config.py flightctl/models/enrollment_request.py flightctl/models/enrollment_request_approval.py @@ -195,6 +208,8 @@ flightctl/models/enrollment_request_status.py flightctl/models/enrollment_service.py flightctl/models/enrollment_service_auth.py flightctl/models/enrollment_service_service.py +flightctl/models/file_content.py +flightctl/models/file_metadata.py flightctl/models/file_operation.py flightctl/models/file_spec.py flightctl/models/fleet.py @@ -214,7 +229,8 @@ flightctl/models/http_config.py flightctl/models/http_config_provider_spec.py flightctl/models/http_config_provider_spec_http_ref.py flightctl/models/http_repo_spec.py -flightctl/models/image_application_provider.py +flightctl/models/image_application_provider_spec.py +flightctl/models/inline_application_provider_spec.py flightctl/models/inline_config_provider_spec.py flightctl/models/kubernetes_secret_provider_spec.py flightctl/models/kubernetes_secret_provider_spec_secret_ref.py @@ -224,6 +240,7 @@ flightctl/models/match_expression.py flightctl/models/memory_resource_monitor_spec.py flightctl/models/object_meta.py flightctl/models/patch_request_inner.py +flightctl/models/relative_path.py flightctl/models/repo_spec_type.py flightctl/models/repository.py flightctl/models/repository_list.py @@ -258,6 +275,9 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_absolute_path.py +test/test_app_type.py +test/test_application_content.py test/test_application_env_vars.py test/test_application_provider_spec.py test/test_application_status_type.py @@ -308,6 +328,7 @@ test/test_device_updated_status_type.py test/test_devices_summary.py test/test_disk_resource_monitor_spec.py test/test_disruption_budget.py +test/test_encoding_type.py test/test_enrollment_config.py test/test_enrollment_request.py test/test_enrollment_request_approval.py @@ -319,6 +340,8 @@ test/test_enrollment_service.py test/test_enrollment_service_auth.py test/test_enrollment_service_service.py test/test_enrollmentrequest_api.py +test/test_file_content.py +test/test_file_metadata.py test/test_file_operation.py test/test_file_spec.py test/test_fleet.py @@ -339,16 +362,19 @@ test/test_http_config.py test/test_http_config_provider_spec.py test/test_http_config_provider_spec_http_ref.py test/test_http_repo_spec.py -test/test_image_application_provider.py +test/test_image_application_provider_spec.py +test/test_inline_application_provider_spec.py test/test_inline_config_provider_spec.py test/test_kubernetes_secret_provider_spec.py test/test_kubernetes_secret_provider_spec_secret_ref.py test/test_label_selector.py +test/test_labels_api.py test/test_list_meta.py test/test_match_expression.py test/test_memory_resource_monitor_spec.py test/test_object_meta.py test/test_patch_request_inner.py +test/test_relative_path.py test/test_repo_spec_type.py test/test_repository.py test/test_repository_api.py diff --git a/README.md b/README.md index 2b56a9d..d28d179 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ Python 3.8+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install git+https://github.com/flightctl/python-client.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/flightctl/python-client.git`) Then import the package: ```python @@ -90,21 +90,21 @@ Class | Method | HTTP request | Description *CertificatesigningrequestApi* | [**create_certificate_signing_request**](docs/CertificatesigningrequestApi.md#create_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**delete_certificate_signing_request**](docs/CertificatesigningrequestApi.md#delete_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**delete_certificate_signing_requests**](docs/CertificatesigningrequestApi.md#delete_certificate_signing_requests) | **DELETE** /api/v1/certificatesigningrequests | +*CertificatesigningrequestApi* | [**get_certificate_signing_request**](docs/CertificatesigningrequestApi.md#get_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**list_certificate_signing_requests**](docs/CertificatesigningrequestApi.md#list_certificate_signing_requests) | **GET** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**patch_certificate_signing_request**](docs/CertificatesigningrequestApi.md#patch_certificate_signing_request) | **PATCH** /api/v1/certificatesigningrequests/{name} | -*CertificatesigningrequestApi* | [**read_certificate_signing_request**](docs/CertificatesigningrequestApi.md#read_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**replace_certificate_signing_request**](docs/CertificatesigningrequestApi.md#replace_certificate_signing_request) | **PUT** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**update_certificate_signing_request_approval**](docs/CertificatesigningrequestApi.md#update_certificate_signing_request_approval) | **PUT** /api/v1/certificatesigningrequests/{name}/approval | *DeviceApi* | [**create_device**](docs/DeviceApi.md#create_device) | **POST** /api/v1/devices | *DeviceApi* | [**decommission_device**](docs/DeviceApi.md#decommission_device) | **PUT** /api/v1/devices/{name}/decommission | *DeviceApi* | [**delete_device**](docs/DeviceApi.md#delete_device) | **DELETE** /api/v1/devices/{name} | *DeviceApi* | [**delete_devices**](docs/DeviceApi.md#delete_devices) | **DELETE** /api/v1/devices | +*DeviceApi* | [**get_device**](docs/DeviceApi.md#get_device) | **GET** /api/v1/devices/{name} | +*DeviceApi* | [**get_device_status**](docs/DeviceApi.md#get_device_status) | **GET** /api/v1/devices/{name}/status | *DeviceApi* | [**get_rendered_device**](docs/DeviceApi.md#get_rendered_device) | **GET** /api/v1/devices/{name}/rendered | *DeviceApi* | [**list_devices**](docs/DeviceApi.md#list_devices) | **GET** /api/v1/devices | *DeviceApi* | [**patch_device**](docs/DeviceApi.md#patch_device) | **PATCH** /api/v1/devices/{name} | *DeviceApi* | [**patch_device_status**](docs/DeviceApi.md#patch_device_status) | **PATCH** /api/v1/devices/{name}/status | -*DeviceApi* | [**read_device**](docs/DeviceApi.md#read_device) | **GET** /api/v1/devices/{name} | -*DeviceApi* | [**read_device_status**](docs/DeviceApi.md#read_device_status) | **GET** /api/v1/devices/{name}/status | *DeviceApi* | [**replace_device**](docs/DeviceApi.md#replace_device) | **PUT** /api/v1/devices/{name} | *DeviceApi* | [**replace_device_status**](docs/DeviceApi.md#replace_device_status) | **PUT** /api/v1/devices/{name}/status | *EnrollmentrequestApi* | [**approve_enrollment_request**](docs/EnrollmentrequestApi.md#approve_enrollment_request) | **PUT** /api/v1/enrollmentrequests/{name}/approval | @@ -112,11 +112,11 @@ Class | Method | HTTP request | Description *EnrollmentrequestApi* | [**delete_enrollment_request**](docs/EnrollmentrequestApi.md#delete_enrollment_request) | **DELETE** /api/v1/enrollmentrequests/{name} | *EnrollmentrequestApi* | [**delete_enrollment_requests**](docs/EnrollmentrequestApi.md#delete_enrollment_requests) | **DELETE** /api/v1/enrollmentrequests | *EnrollmentrequestApi* | [**get_enrollment_config**](docs/EnrollmentrequestApi.md#get_enrollment_config) | **GET** /api/v1/enrollmentconfig | +*EnrollmentrequestApi* | [**get_enrollment_request**](docs/EnrollmentrequestApi.md#get_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | +*EnrollmentrequestApi* | [**get_enrollment_request_status**](docs/EnrollmentrequestApi.md#get_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | *EnrollmentrequestApi* | [**list_enrollment_requests**](docs/EnrollmentrequestApi.md#list_enrollment_requests) | **GET** /api/v1/enrollmentrequests | *EnrollmentrequestApi* | [**patch_enrollment_request**](docs/EnrollmentrequestApi.md#patch_enrollment_request) | **PATCH** /api/v1/enrollmentrequests/{name} | *EnrollmentrequestApi* | [**patch_enrollment_request_status**](docs/EnrollmentrequestApi.md#patch_enrollment_request_status) | **PATCH** /api/v1/enrollmentrequests/{name}/status | -*EnrollmentrequestApi* | [**read_enrollment_request**](docs/EnrollmentrequestApi.md#read_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | -*EnrollmentrequestApi* | [**read_enrollment_request_status**](docs/EnrollmentrequestApi.md#read_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | *EnrollmentrequestApi* | [**replace_enrollment_request**](docs/EnrollmentrequestApi.md#replace_enrollment_request) | **PUT** /api/v1/enrollmentrequests/{name} | *EnrollmentrequestApi* | [**replace_enrollment_request_status**](docs/EnrollmentrequestApi.md#replace_enrollment_request_status) | **PUT** /api/v1/enrollmentrequests/{name}/status | *FleetApi* | [**create_fleet**](docs/FleetApi.md#create_fleet) | **POST** /api/v1/fleets | @@ -124,34 +124,38 @@ Class | Method | HTTP request | Description *FleetApi* | [**delete_fleets**](docs/FleetApi.md#delete_fleets) | **DELETE** /api/v1/fleets | *FleetApi* | [**delete_template_version**](docs/FleetApi.md#delete_template_version) | **DELETE** /api/v1/fleets/{fleet}/templateversions/{name} | *FleetApi* | [**delete_template_versions**](docs/FleetApi.md#delete_template_versions) | **DELETE** /api/v1/fleets/{fleet}/templateversions | +*FleetApi* | [**get_fleet**](docs/FleetApi.md#get_fleet) | **GET** /api/v1/fleets/{name} | +*FleetApi* | [**get_fleet_status**](docs/FleetApi.md#get_fleet_status) | **GET** /api/v1/fleets/{name}/status | +*FleetApi* | [**get_template_version**](docs/FleetApi.md#get_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | *FleetApi* | [**list_fleets**](docs/FleetApi.md#list_fleets) | **GET** /api/v1/fleets | *FleetApi* | [**list_template_versions**](docs/FleetApi.md#list_template_versions) | **GET** /api/v1/fleets/{fleet}/templateversions | *FleetApi* | [**patch_fleet**](docs/FleetApi.md#patch_fleet) | **PATCH** /api/v1/fleets/{name} | *FleetApi* | [**patch_fleet_status**](docs/FleetApi.md#patch_fleet_status) | **PATCH** /api/v1/fleets/{name}/status | -*FleetApi* | [**read_fleet**](docs/FleetApi.md#read_fleet) | **GET** /api/v1/fleets/{name} | -*FleetApi* | [**read_fleet_status**](docs/FleetApi.md#read_fleet_status) | **GET** /api/v1/fleets/{name}/status | -*FleetApi* | [**read_template_version**](docs/FleetApi.md#read_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | *FleetApi* | [**replace_fleet**](docs/FleetApi.md#replace_fleet) | **PUT** /api/v1/fleets/{name} | *FleetApi* | [**replace_fleet_status**](docs/FleetApi.md#replace_fleet_status) | **PUT** /api/v1/fleets/{name}/status | +*LabelsApi* | [**list_labels**](docs/LabelsApi.md#list_labels) | **GET** /api/v1/labels | *RepositoryApi* | [**create_repository**](docs/RepositoryApi.md#create_repository) | **POST** /api/v1/repositories | *RepositoryApi* | [**delete_repositories**](docs/RepositoryApi.md#delete_repositories) | **DELETE** /api/v1/repositories | *RepositoryApi* | [**delete_repository**](docs/RepositoryApi.md#delete_repository) | **DELETE** /api/v1/repositories/{name} | +*RepositoryApi* | [**get_repository**](docs/RepositoryApi.md#get_repository) | **GET** /api/v1/repositories/{name} | *RepositoryApi* | [**list_repositories**](docs/RepositoryApi.md#list_repositories) | **GET** /api/v1/repositories | *RepositoryApi* | [**patch_repository**](docs/RepositoryApi.md#patch_repository) | **PATCH** /api/v1/repositories/{name} | -*RepositoryApi* | [**read_repository**](docs/RepositoryApi.md#read_repository) | **GET** /api/v1/repositories/{name} | *RepositoryApi* | [**replace_repository**](docs/RepositoryApi.md#replace_repository) | **PUT** /api/v1/repositories/{name} | *ResourcesyncApi* | [**create_resource_sync**](docs/ResourcesyncApi.md#create_resource_sync) | **POST** /api/v1/resourcesyncs | *ResourcesyncApi* | [**delete_resource_sync**](docs/ResourcesyncApi.md#delete_resource_sync) | **DELETE** /api/v1/resourcesyncs/{name} | *ResourcesyncApi* | [**delete_resource_syncs**](docs/ResourcesyncApi.md#delete_resource_syncs) | **DELETE** /api/v1/resourcesyncs | -*ResourcesyncApi* | [**list_resource_sync**](docs/ResourcesyncApi.md#list_resource_sync) | **GET** /api/v1/resourcesyncs | +*ResourcesyncApi* | [**get_resource_sync**](docs/ResourcesyncApi.md#get_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | +*ResourcesyncApi* | [**list_resource_syncs**](docs/ResourcesyncApi.md#list_resource_syncs) | **GET** /api/v1/resourcesyncs | *ResourcesyncApi* | [**patch_resource_sync**](docs/ResourcesyncApi.md#patch_resource_sync) | **PATCH** /api/v1/resourcesyncs/{name} | -*ResourcesyncApi* | [**read_resource_sync**](docs/ResourcesyncApi.md#read_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | *ResourcesyncApi* | [**replace_resource_sync**](docs/ResourcesyncApi.md#replace_resource_sync) | **PUT** /api/v1/resourcesyncs/{name} | *VersionApi* | [**get_version**](docs/VersionApi.md#get_version) | **GET** /api/version | ## Documentation For Models + - [AbsolutePath](docs/AbsolutePath.md) + - [AppType](docs/AppType.md) + - [ApplicationContent](docs/ApplicationContent.md) - [ApplicationEnvVars](docs/ApplicationEnvVars.md) - [ApplicationProviderSpec](docs/ApplicationProviderSpec.md) - [ApplicationStatusType](docs/ApplicationStatusType.md) @@ -199,6 +203,7 @@ Class | Method | HTTP request | Description - [DevicesSummary](docs/DevicesSummary.md) - [DiskResourceMonitorSpec](docs/DiskResourceMonitorSpec.md) - [DisruptionBudget](docs/DisruptionBudget.md) + - [EncodingType](docs/EncodingType.md) - [EnrollmentConfig](docs/EnrollmentConfig.md) - [EnrollmentRequest](docs/EnrollmentRequest.md) - [EnrollmentRequestApproval](docs/EnrollmentRequestApproval.md) @@ -209,6 +214,8 @@ Class | Method | HTTP request | Description - [EnrollmentService](docs/EnrollmentService.md) - [EnrollmentServiceAuth](docs/EnrollmentServiceAuth.md) - [EnrollmentServiceService](docs/EnrollmentServiceService.md) + - [FileContent](docs/FileContent.md) + - [FileMetadata](docs/FileMetadata.md) - [FileOperation](docs/FileOperation.md) - [FileSpec](docs/FileSpec.md) - [Fleet](docs/Fleet.md) @@ -228,7 +235,8 @@ Class | Method | HTTP request | Description - [HttpConfigProviderSpec](docs/HttpConfigProviderSpec.md) - [HttpConfigProviderSpecHttpRef](docs/HttpConfigProviderSpecHttpRef.md) - [HttpRepoSpec](docs/HttpRepoSpec.md) - - [ImageApplicationProvider](docs/ImageApplicationProvider.md) + - [ImageApplicationProviderSpec](docs/ImageApplicationProviderSpec.md) + - [InlineApplicationProviderSpec](docs/InlineApplicationProviderSpec.md) - [InlineConfigProviderSpec](docs/InlineConfigProviderSpec.md) - [KubernetesSecretProviderSpec](docs/KubernetesSecretProviderSpec.md) - [KubernetesSecretProviderSpecSecretRef](docs/KubernetesSecretProviderSpecSecretRef.md) @@ -238,6 +246,7 @@ Class | Method | HTTP request | Description - [MemoryResourceMonitorSpec](docs/MemoryResourceMonitorSpec.md) - [ObjectMeta](docs/ObjectMeta.md) - [PatchRequestInner](docs/PatchRequestInner.md) + - [RelativePath](docs/RelativePath.md) - [RepoSpecType](docs/RepoSpecType.md) - [Repository](docs/Repository.md) - [RepositoryList](docs/RepositoryList.md) diff --git a/api/v1alpha1/openapi.yml b/api/v1alpha1/openapi.yml index 3e705d4..d17de99 100644 --- a/api/v1alpha1/openapi.yml +++ b/api/v1alpha1/openapi.yml @@ -73,6 +73,10 @@ paths: $ref: '#/components/schemas/AuthConfig' "418": description: Auth not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/auth/validate: get: tags: @@ -88,10 +92,28 @@ paths: responses: "200": description: Token valid + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "401": description: Token invalid + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "418": description: Auth not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "500": description: InternalServerError content: @@ -103,7 +125,7 @@ paths: tags: - resourcesync description: List ResourceSync resources. - operationId: listResourceSync + operationId: listResourceSyncs parameters: - name: continue in: query @@ -242,7 +264,7 @@ paths: tags: - resourcesync description: Get a ResourceSync resource. - operationId: readResourceSync + operationId: getResourceSync parameters: - name: name in: path @@ -427,7 +449,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ResourceSync' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -596,7 +618,7 @@ paths: tags: - repository description: Get a Repository resource. - operationId: readRepository + operationId: getRepository parameters: - name: name in: path @@ -720,7 +742,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Repository' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -956,7 +978,7 @@ paths: tags: - device description: Get a Device resource. - operationId: readDevice + operationId: getDevice parameters: - name: name in: path @@ -1080,7 +1102,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Device' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -1171,7 +1193,7 @@ paths: tags: - device description: Get the status of a Device resource. - operationId: readDeviceStatus + operationId: getDeviceStatus parameters: - name: name in: path @@ -1629,7 +1651,7 @@ paths: tags: - enrollmentrequest description: Get an EnrollmentRequest resource. - operationId: readEnrollmentRequest + operationId: getEnrollmentRequest parameters: - name: name in: path @@ -1814,7 +1836,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EnrollmentRequest' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -1844,7 +1866,7 @@ paths: tags: - enrollmentrequest description: Get the status of an EnrollmentRequest resource. - operationId: readEnrollmentRequestStatus + operationId: getEnrollmentRequestStatus parameters: - name: name in: path @@ -2254,7 +2276,7 @@ paths: tags: - certificatesigningrequest description: read the specified certificateSigningRequest - operationId: readCertificateSigningRequest + operationId: getCertificateSigningRequest parameters: - name: name in: path @@ -2379,7 +2401,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -2616,7 +2638,7 @@ paths: tags: - fleet description: Get a Fleet resource. - operationId: readFleet + operationId: getFleet parameters: - name: name in: path @@ -2807,7 +2829,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -2837,7 +2859,7 @@ paths: tags: - fleet description: read status of the specified Fleet - operationId: readFleetStatus + operationId: getFleetStatus parameters: - name: name in: path @@ -3089,7 +3111,7 @@ paths: tags: - fleet description: read the specified template version - operationId: readTemplateVersion + operationId: getTemplateVersion parameters: - name: fleet in: path @@ -3158,7 +3180,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateVersion' + $ref: '#/components/schemas/Status' "401": description: Unauthorized content: @@ -3306,9 +3328,6 @@ components: metadata: $ref: '#/components/schemas/ObjectMeta' spec: - type: object - nullable: true #EDM-850 - description: 'Specification of the repository (nullable for deletion).' $ref: '#/components/schemas/RepositorySpec' status: $ref: '#/components/schemas/RepositoryStatus' @@ -3566,20 +3585,52 @@ components: - name - inline FileSpec: + allOf: + - $ref: "#/components/schemas/FileContent" + - $ref: "#/components/schemas/FileMetadata" + - $ref: "#/components/schemas/AbsolutePath" + - type: object + required: + - path + - content + FileContent: + description: The content of a file. type: object properties: - path: - type: string - description: The absolute path to the file on the device. Note that any existing file will be overwritten. content: type: string description: The plain text (UTF-8) or base64-encoded content of the file. contentEncoding: + $ref: "#/components/schemas/EncodingType" + AbsolutePath: + type: object + description: Represents an absolute file path. + properties: + path: + type: string + description: The absolute path to a file on the system. Note that any existing file will be overwritten. + example: "/var/log/app.log" + RelativePath: + type: object + description: Represents a relative file path. + properties: + path: type: string - description: How the contents are encoded. Must be either "plain" or "base64". Defaults to "plain". - enum: - - plain - - base64 + description: A relative file path on the system. Note that any existing file will be overwritten. + example: "src/index.js" + EncodingType: + type: string + description: Specifies the encoding type used for data representation. + enum: + - plain + - base64 + x-enum-varnames: + - "EncodingPlain" + - "EncodingBase64" + FileMetadata: + description: File metadata. + type: object + properties: mode: type: integer description: The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. @@ -3589,9 +3640,6 @@ components: group: type: string description: The file's group, specified either as a name or numeric ID. Defaults to "root". - required: - - path - - content HttpConfigProviderSpec: type: object properties: @@ -3626,10 +3674,12 @@ components: name: type: string description: The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace. + appType: + $ref: '#/components/schemas/AppType' - oneOf: - - $ref: '#/components/schemas/ImageApplicationProvider' - # extend application providers - ImageApplicationProvider: + - $ref: '#/components/schemas/ImageApplicationProviderSpec' + - $ref: '#/components/schemas/InlineApplicationProviderSpec' + ImageApplicationProviderSpec: type: object properties: image: @@ -3637,6 +3687,23 @@ components: description: Reference to the container image for the application package. required: - image + InlineApplicationProviderSpec: + type: object + properties: + inline: + type: array + description: A list of application content. + items: + $ref: "#/components/schemas/ApplicationContent" + required: + - inline + ApplicationContent: + allOf: + - $ref: '#/components/schemas/FileContent' + - $ref: '#/components/schemas/RelativePath' + - type: object + required: + - path ApplicationEnvVars: type: object properties: @@ -3645,6 +3712,13 @@ components: description: Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters. additionalProperties: type: string + AppType: + type: string + description: The type of the application. + enum: + - "compose" + x-enum-varnames: + - "AppTypeCompose" ResourceMonitor: oneOf: - $ref: '#/components/schemas/CpuResourceMonitorSpec' @@ -4138,15 +4212,15 @@ components: type: object description: Current status of the resources of the device. required: - - cpu - - memory - - disk + - CPU + - Memory + - Disk properties: - cpu: + CPU: $ref: "#/components/schemas/DeviceResourceStatusType" - memory: + Memory: $ref: "#/components/schemas/DeviceResourceStatusType" - disk: + Disk: $ref: "#/components/schemas/DeviceResourceStatusType" DeviceResourceStatusType: type: string @@ -4626,7 +4700,6 @@ components: applicationStatus: type: object default: {} - nullable: true #EDM-851 additionalProperties: type: integer format: int64 @@ -4634,7 +4707,6 @@ components: summaryStatus: type: object default: {} - nullable: true #EDM-851 additionalProperties: type: integer format: int64 @@ -4642,7 +4714,6 @@ components: updateStatus: type: object default: {} - nullable: true #EDM-851 additionalProperties: type: integer format: int64 @@ -4885,10 +4956,12 @@ components: type: string description: Type of condition in CamelCase. enum: - - 'Approved' # EnrollmentRequest and CertificateSigningRequest #EDM-1249 + - 'Approved' # EnrollmentRequest + - 'Approved' # CertificateSigningRequest - 'Denied' # CertificateSigningRequest - 'Failed' # CertificateSigningRequest - - 'Accessible' # Repository and ResourceSync #EDM-1249 + - 'Accessible' # Repository + - 'Accessible' # ResourceSync - 'ResourceParsed' # ResourceSync - 'Synced' # ResourceSync - 'OverlappingSelectors' # Fleet @@ -4986,7 +5059,6 @@ components: description: The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource. format: byte type: string - nullable: true #EDM-852 signerName: description: Indicates the requested signer, and is a qualified name. type: string diff --git a/docs/AbsolutePath.md b/docs/AbsolutePath.md new file mode 100644 index 0000000..e434b62 --- /dev/null +++ b/docs/AbsolutePath.md @@ -0,0 +1,30 @@ +# AbsolutePath + +Represents an absolute file path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | The absolute path to a file on the system. Note that any existing file will be overwritten. | [optional] + +## Example + +```python +from flightctl.models.absolute_path import AbsolutePath + +# TODO update the JSON string below +json = "{}" +# create an instance of AbsolutePath from a JSON string +absolute_path_instance = AbsolutePath.from_json(json) +# print the JSON string representation of the object +print(AbsolutePath.to_json()) + +# convert the object into a dict +absolute_path_dict = absolute_path_instance.to_dict() +# create an instance of AbsolutePath from a dict +absolute_path_from_dict = AbsolutePath.from_dict(absolute_path_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AppType.md b/docs/AppType.md new file mode 100644 index 0000000..b23ba50 --- /dev/null +++ b/docs/AppType.md @@ -0,0 +1,11 @@ +# AppType + +The type of the application. + +## Enum + +* `COMPOSE` (value: `'compose'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationContent.md b/docs/ApplicationContent.md new file mode 100644 index 0000000..2a96622 --- /dev/null +++ b/docs/ApplicationContent.md @@ -0,0 +1,31 @@ +# ApplicationContent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | The plain text (UTF-8) or base64-encoded content of the file. | [optional] +**content_encoding** | [**EncodingType**](EncodingType.md) | | [optional] +**path** | **str** | A relative file path on the system. Note that any existing file will be overwritten. | + +## Example + +```python +from flightctl.models.application_content import ApplicationContent + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationContent from a JSON string +application_content_instance = ApplicationContent.from_json(json) +# print the JSON string representation of the object +print(ApplicationContent.to_json()) + +# convert the object into a dict +application_content_dict = application_content_instance.to_dict() +# create an instance of ApplicationContent from a dict +application_content_from_dict = ApplicationContent.from_dict(application_content_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationProviderSpec.md b/docs/ApplicationProviderSpec.md index 04e51b8..8a0fa11 100644 --- a/docs/ApplicationProviderSpec.md +++ b/docs/ApplicationProviderSpec.md @@ -6,8 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters. | [optional] -**name** | **str** | The name of the application must be between 1 and 253 characters and start with a letter or number. | [optional] +**name** | **str** | The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace. | [optional] +**app_type** | [**AppType**](AppType.md) | | [optional] **image** | **str** | Reference to the container image for the application package. | +**inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | ## Example diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index 2888669..bbbd4e5 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -73,7 +73,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **auth_validate** -> auth_validate(authorization=authorization) +> Status auth_validate(authorization=authorization) @@ -84,6 +84,7 @@ Validate an authentication token. ```python import flightctl +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -101,7 +102,9 @@ with flightctl.ApiClient(configuration) as api_client: authorization = 'authorization_example' # str | The authentication token to validate. (optional) try: - api_instance.auth_validate(authorization=authorization) + api_response = api_instance.auth_validate(authorization=authorization) + print("The response of AuthenticationApi->auth_validate:\n") + pprint(api_response) except Exception as e: print("Exception when calling AuthenticationApi->auth_validate: %s\n" % e) ``` @@ -117,7 +120,7 @@ Name | Type | Description | Notes ### Return type -void (empty response body) +[**Status**](Status.md) ### Authorization @@ -133,6 +136,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Token valid | - | +**400** | Bad Request | - | **401** | Token invalid | - | **418** | Auth not configured | - | **500** | InternalServerError | - | diff --git a/docs/CertificatesigningrequestApi.md b/docs/CertificatesigningrequestApi.md index e220e32..5a3edf5 100644 --- a/docs/CertificatesigningrequestApi.md +++ b/docs/CertificatesigningrequestApi.md @@ -7,9 +7,9 @@ Method | HTTP request | Description [**create_certificate_signing_request**](CertificatesigningrequestApi.md#create_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests | [**delete_certificate_signing_request**](CertificatesigningrequestApi.md#delete_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name} | [**delete_certificate_signing_requests**](CertificatesigningrequestApi.md#delete_certificate_signing_requests) | **DELETE** /api/v1/certificatesigningrequests | +[**get_certificate_signing_request**](CertificatesigningrequestApi.md#get_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | [**list_certificate_signing_requests**](CertificatesigningrequestApi.md#list_certificate_signing_requests) | **GET** /api/v1/certificatesigningrequests | [**patch_certificate_signing_request**](CertificatesigningrequestApi.md#patch_certificate_signing_request) | **PATCH** /api/v1/certificatesigningrequests/{name} | -[**read_certificate_signing_request**](CertificatesigningrequestApi.md#read_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | [**replace_certificate_signing_request**](CertificatesigningrequestApi.md#replace_certificate_signing_request) | **PUT** /api/v1/certificatesigningrequests/{name} | [**update_certificate_signing_request_approval**](CertificatesigningrequestApi.md#update_certificate_signing_request_approval) | **PUT** /api/v1/certificatesigningrequests/{name}/approval | @@ -87,7 +87,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_certificate_signing_request** -> CertificateSigningRequest delete_certificate_signing_request(name) +> Status delete_certificate_signing_request(name) @@ -98,7 +98,7 @@ delete a Certificate Signing Request ```python import flightctl -from flightctl.models.certificate_signing_request import CertificateSigningRequest +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -134,7 +134,7 @@ Name | Type | Description | Notes ### Return type -[**CertificateSigningRequest**](CertificateSigningRequest.md) +[**Status**](Status.md) ### Authorization @@ -223,19 +223,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_certificate_signing_requests** -> CertificateSigningRequestList list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) +# **get_certificate_signing_request** +> CertificateSigningRequest get_certificate_signing_request(name) -List CertificateSigningRequest resources. +read the specified certificateSigningRequest ### Example ```python import flightctl -from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList +from flightctl.models.certificate_signing_request import CertificateSigningRequest from flightctl.rest import ApiException from pprint import pprint @@ -250,17 +250,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the CertificateSigningRequest resource to get. try: - api_response = api_instance.list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - print("The response of CertificatesigningrequestApi->list_certificate_signing_requests:\n") + api_response = api_instance.get_certificate_signing_request(name) + print("The response of CertificatesigningrequestApi->get_certificate_signing_request:\n") pprint(api_response) except Exception as e: - print("Exception when calling CertificatesigningrequestApi->list_certificate_signing_requests: %s\n" % e) + print("Exception when calling CertificatesigningrequestApi->get_certificate_signing_request: %s\n" % e) ``` @@ -270,14 +267,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the CertificateSigningRequest resource to get. | ### Return type -[**CertificateSigningRequestList**](CertificateSigningRequestList.md) +[**CertificateSigningRequest**](CertificateSigningRequest.md) ### Authorization @@ -293,27 +287,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_certificate_signing_request** -> CertificateSigningRequest patch_certificate_signing_request(name, patch_request_inner) +# **list_certificate_signing_requests** +> CertificateSigningRequestList list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -Patch a CertificateSigningRequest resource. +List CertificateSigningRequest resources. ### Example ```python import flightctl -from flightctl.models.certificate_signing_request import CertificateSigningRequest -from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList from flightctl.rest import ApiException from pprint import pprint @@ -328,15 +321,17 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | The name of the CertificateSigningRequest resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) try: - api_response = api_instance.patch_certificate_signing_request(name, patch_request_inner) - print("The response of CertificatesigningrequestApi->patch_certificate_signing_request:\n") + api_response = api_instance.list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of CertificatesigningrequestApi->list_certificate_signing_requests:\n") pprint(api_response) except Exception as e: - print("Exception when calling CertificatesigningrequestApi->patch_certificate_signing_request: %s\n" % e) + print("Exception when calling CertificatesigningrequestApi->list_certificate_signing_requests: %s\n" % e) ``` @@ -346,12 +341,14 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the CertificateSigningRequest resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] ### Return type -[**CertificateSigningRequest**](CertificateSigningRequest.md) +[**CertificateSigningRequestList**](CertificateSigningRequestList.md) ### Authorization @@ -359,7 +356,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -369,19 +366,17 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**404** | NotFound | - | **403** | Forbidden | - | -**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_certificate_signing_request** -> CertificateSigningRequest read_certificate_signing_request(name) +# **patch_certificate_signing_request** +> CertificateSigningRequest patch_certificate_signing_request(name, patch_request_inner) -read the specified certificateSigningRequest +Patch a CertificateSigningRequest resource. ### Example @@ -389,6 +384,7 @@ read the specified certificateSigningRequest ```python import flightctl from flightctl.models.certificate_signing_request import CertificateSigningRequest +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -403,14 +399,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | The name of the CertificateSigningRequest resource to get. + name = 'name_example' # str | The name of the CertificateSigningRequest resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_certificate_signing_request(name) - print("The response of CertificatesigningrequestApi->read_certificate_signing_request:\n") + api_response = api_instance.patch_certificate_signing_request(name, patch_request_inner) + print("The response of CertificatesigningrequestApi->patch_certificate_signing_request:\n") pprint(api_response) except Exception as e: - print("Exception when calling CertificatesigningrequestApi->read_certificate_signing_request: %s\n" % e) + print("Exception when calling CertificatesigningrequestApi->patch_certificate_signing_request: %s\n" % e) ``` @@ -420,7 +417,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the CertificateSigningRequest resource to get. | + **name** | **str**| The name of the CertificateSigningRequest resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -432,7 +430,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -440,9 +438,11 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | -**403** | Forbidden | - | **404** | NotFound | - | +**403** | Forbidden | - | +**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DeviceApi.md b/docs/DeviceApi.md index 19946aa..7591a9b 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -8,12 +8,12 @@ Method | HTTP request | Description [**decommission_device**](DeviceApi.md#decommission_device) | **PUT** /api/v1/devices/{name}/decommission | [**delete_device**](DeviceApi.md#delete_device) | **DELETE** /api/v1/devices/{name} | [**delete_devices**](DeviceApi.md#delete_devices) | **DELETE** /api/v1/devices | +[**get_device**](DeviceApi.md#get_device) | **GET** /api/v1/devices/{name} | +[**get_device_status**](DeviceApi.md#get_device_status) | **GET** /api/v1/devices/{name}/status | [**get_rendered_device**](DeviceApi.md#get_rendered_device) | **GET** /api/v1/devices/{name}/rendered | [**list_devices**](DeviceApi.md#list_devices) | **GET** /api/v1/devices | [**patch_device**](DeviceApi.md#patch_device) | **PATCH** /api/v1/devices/{name} | [**patch_device_status**](DeviceApi.md#patch_device_status) | **PATCH** /api/v1/devices/{name}/status | -[**read_device**](DeviceApi.md#read_device) | **GET** /api/v1/devices/{name} | -[**read_device_status**](DeviceApi.md#read_device_status) | **GET** /api/v1/devices/{name}/status | [**replace_device**](DeviceApi.md#replace_device) | **PUT** /api/v1/devices/{name} | [**replace_device_status**](DeviceApi.md#replace_device_status) | **PUT** /api/v1/devices/{name}/status | @@ -166,7 +166,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_device** -> Device delete_device(name) +> Status delete_device(name) @@ -177,7 +177,7 @@ Delete a Device resource. ```python import flightctl -from flightctl.models.device import Device +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -213,7 +213,7 @@ Name | Type | Description | Notes ### Return type -[**Device**](Device.md) +[**Status**](Status.md) ### Authorization @@ -302,12 +302,12 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_rendered_device** -> Device get_rendered_device(name, known_rendered_version=known_rendered_version) +# **get_device** +> Device get_device(name) -Get the rendered device. +Get a Device resource. ### Example @@ -329,15 +329,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | The name of the Device resource to get the rendered device specification for. - known_rendered_version = 'known_rendered_version_example' # str | The last known renderedVersion. (optional) + name = 'name_example' # str | The name of the Device resource to get. try: - api_response = api_instance.get_rendered_device(name, known_rendered_version=known_rendered_version) - print("The response of DeviceApi->get_rendered_device:\n") + api_response = api_instance.get_device(name) + print("The response of DeviceApi->get_device:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->get_rendered_device: %s\n" % e) + print("Exception when calling DeviceApi->get_device: %s\n" % e) ``` @@ -347,8 +346,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Device resource to get the rendered device specification for. | - **known_rendered_version** | **str**| The last known renderedVersion. | [optional] + **name** | **str**| The name of the Device resource to get. | ### Return type @@ -368,28 +366,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**204** | No content | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | -**409** | StatusConflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_devices** -> DeviceList list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, summary_only=summary_only) +# **get_device_status** +> Device get_device_status(name) -List Device resources. +Get the status of a Device resource. ### Example ```python import flightctl -from flightctl.models.device_list import DeviceList +from flightctl.models.device import Device from flightctl.rest import ApiException from pprint import pprint @@ -404,18 +400,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) - summary_only = True # bool | A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. (optional) + name = 'name_example' # str | The name of the Device resource to get. try: - api_response = api_instance.list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, summary_only=summary_only) - print("The response of DeviceApi->list_devices:\n") + api_response = api_instance.get_device_status(name) + print("The response of DeviceApi->get_device_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->list_devices: %s\n" % e) + print("Exception when calling DeviceApi->get_device_status: %s\n" % e) ``` @@ -425,15 +417,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] - **summary_only** | **bool**| A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. | [optional] + **name** | **str**| The name of the Device resource to get. | ### Return type -[**DeviceList**](DeviceList.md) +[**Device**](Device.md) ### Authorization @@ -449,19 +437,19 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | -**403** | Not allowed | - | +**403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_device** -> Device patch_device(name, patch_request_inner) +# **get_rendered_device** +> Device get_rendered_device(name, known_rendered_version=known_rendered_version) -Patch a Device resource. +Get the rendered device. ### Example @@ -469,7 +457,6 @@ Patch a Device resource. ```python import flightctl from flightctl.models.device import Device -from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -484,15 +471,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | The name of the Device resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + name = 'name_example' # str | The name of the Device resource to get the rendered device specification for. + known_rendered_version = 'known_rendered_version_example' # str | The last known renderedVersion. (optional) try: - api_response = api_instance.patch_device(name, patch_request_inner) - print("The response of DeviceApi->patch_device:\n") + api_response = api_instance.get_rendered_device(name, known_rendered_version=known_rendered_version) + print("The response of DeviceApi->get_rendered_device:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->patch_device: %s\n" % e) + print("Exception when calling DeviceApi->get_rendered_device: %s\n" % e) ``` @@ -502,8 +489,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Device resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **name** | **str**| The name of the Device resource to get the rendered device specification for. | + **known_rendered_version** | **str**| The last known renderedVersion. | [optional] ### Return type @@ -515,7 +502,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -523,7 +510,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | +**204** | No content | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | @@ -532,20 +519,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_device_status** -> Device patch_device_status(name, patch_request_inner) +# **list_devices** +> DeviceList list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, summary_only=summary_only) -Patch the status of a Device resource. +List Device resources. ### Example ```python import flightctl -from flightctl.models.device import Device -from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.device_list import DeviceList from flightctl.rest import ApiException from pprint import pprint @@ -560,15 +546,18 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | The name of the Device resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + summary_only = True # bool | A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. (optional) try: - api_response = api_instance.patch_device_status(name, patch_request_inner) - print("The response of DeviceApi->patch_device_status:\n") + api_response = api_instance.list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, summary_only=summary_only) + print("The response of DeviceApi->list_devices:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->patch_device_status: %s\n" % e) + print("Exception when calling DeviceApi->list_devices: %s\n" % e) ``` @@ -578,12 +567,15 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Device resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **summary_only** | **bool**| A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. | [optional] ### Return type -[**Device**](Device.md) +[**DeviceList**](DeviceList.md) ### Authorization @@ -591,7 +583,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -601,18 +593,17 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | -**403** | Forbidden | - | -**404** | NotFound | - | +**403** | Not allowed | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_device** -> Device read_device(name) +# **patch_device** +> Device patch_device(name, patch_request_inner) -Get a Device resource. +Patch a Device resource. ### Example @@ -620,6 +611,7 @@ Get a Device resource. ```python import flightctl from flightctl.models.device import Device +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -634,14 +626,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | The name of the Device resource to get. + name = 'name_example' # str | The name of the Device resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_device(name) - print("The response of DeviceApi->read_device:\n") + api_response = api_instance.patch_device(name, patch_request_inner) + print("The response of DeviceApi->patch_device:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->read_device: %s\n" % e) + print("Exception when calling DeviceApi->patch_device: %s\n" % e) ``` @@ -651,7 +644,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Device resource to get. | + **name** | **str**| The name of the Device resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -663,7 +657,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -671,19 +665,21 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | StatusConflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_device_status** -> Device read_device_status(name) +# **patch_device_status** +> Device patch_device_status(name, patch_request_inner) -Get the status of a Device resource. +Patch the status of a Device resource. ### Example @@ -691,6 +687,7 @@ Get the status of a Device resource. ```python import flightctl from flightctl.models.device import Device +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -705,14 +702,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | The name of the Device resource to get. + name = 'name_example' # str | The name of the Device resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_device_status(name) - print("The response of DeviceApi->read_device_status:\n") + api_response = api_instance.patch_device_status(name, patch_request_inner) + print("The response of DeviceApi->patch_device_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling DeviceApi->read_device_status: %s\n" % e) + print("Exception when calling DeviceApi->patch_device_status: %s\n" % e) ``` @@ -722,7 +720,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Device resource to get. | + **name** | **str**| The name of the Device resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -734,7 +733,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -742,6 +741,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | diff --git a/docs/EncodingType.md b/docs/EncodingType.md new file mode 100644 index 0000000..2bc207f --- /dev/null +++ b/docs/EncodingType.md @@ -0,0 +1,13 @@ +# EncodingType + +Specifies the encoding type used for data representation. + +## Enum + +* `PLAIN` (value: `'plain'`) + +* `BASE64` (value: `'base64'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EnrollmentrequestApi.md b/docs/EnrollmentrequestApi.md index 8d39309..32b8c9f 100644 --- a/docs/EnrollmentrequestApi.md +++ b/docs/EnrollmentrequestApi.md @@ -9,11 +9,11 @@ Method | HTTP request | Description [**delete_enrollment_request**](EnrollmentrequestApi.md#delete_enrollment_request) | **DELETE** /api/v1/enrollmentrequests/{name} | [**delete_enrollment_requests**](EnrollmentrequestApi.md#delete_enrollment_requests) | **DELETE** /api/v1/enrollmentrequests | [**get_enrollment_config**](EnrollmentrequestApi.md#get_enrollment_config) | **GET** /api/v1/enrollmentconfig | +[**get_enrollment_request**](EnrollmentrequestApi.md#get_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | +[**get_enrollment_request_status**](EnrollmentrequestApi.md#get_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | [**list_enrollment_requests**](EnrollmentrequestApi.md#list_enrollment_requests) | **GET** /api/v1/enrollmentrequests | [**patch_enrollment_request**](EnrollmentrequestApi.md#patch_enrollment_request) | **PATCH** /api/v1/enrollmentrequests/{name} | [**patch_enrollment_request_status**](EnrollmentrequestApi.md#patch_enrollment_request_status) | **PATCH** /api/v1/enrollmentrequests/{name}/status | -[**read_enrollment_request**](EnrollmentrequestApi.md#read_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | -[**read_enrollment_request_status**](EnrollmentrequestApi.md#read_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | [**replace_enrollment_request**](EnrollmentrequestApi.md#replace_enrollment_request) | **PUT** /api/v1/enrollmentrequests/{name} | [**replace_enrollment_request_status**](EnrollmentrequestApi.md#replace_enrollment_request_status) | **PUT** /api/v1/enrollmentrequests/{name}/status | @@ -166,7 +166,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_enrollment_request** -> EnrollmentRequest delete_enrollment_request(name) +> Status delete_enrollment_request(name) @@ -177,7 +177,7 @@ Delete an EnrollmentRequest resource. ```python import flightctl -from flightctl.models.enrollment_request import EnrollmentRequest +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -213,7 +213,7 @@ Name | Type | Description | Notes ### Return type -[**EnrollmentRequest**](EnrollmentRequest.md) +[**Status**](Status.md) ### Authorization @@ -374,19 +374,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_enrollment_requests** -> EnrollmentRequestList list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) +# **get_enrollment_request** +> EnrollmentRequest get_enrollment_request(name) -List EnrollmentRequest resources. +Get an EnrollmentRequest resource. ### Example ```python import flightctl -from flightctl.models.enrollment_request_list import EnrollmentRequestList +from flightctl.models.enrollment_request import EnrollmentRequest from flightctl.rest import ApiException from pprint import pprint @@ -401,17 +401,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the EnrollmentRequest resource to get. try: - api_response = api_instance.list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - print("The response of EnrollmentrequestApi->list_enrollment_requests:\n") + api_response = api_instance.get_enrollment_request(name) + print("The response of EnrollmentrequestApi->get_enrollment_request:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnrollmentrequestApi->list_enrollment_requests: %s\n" % e) + print("Exception when calling EnrollmentrequestApi->get_enrollment_request: %s\n" % e) ``` @@ -421,14 +418,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the EnrollmentRequest resource to get. | ### Return type -[**EnrollmentRequestList**](EnrollmentRequestList.md) +[**EnrollmentRequest**](EnrollmentRequest.md) ### Authorization @@ -444,19 +438,19 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_enrollment_request** -> EnrollmentRequest patch_enrollment_request(name, patch_request_inner) +# **get_enrollment_request_status** +> EnrollmentRequest get_enrollment_request_status(name) -Patch an EnrollmentRequest resource. +Get the status of an EnrollmentRequest resource. ### Example @@ -464,7 +458,6 @@ Patch an EnrollmentRequest resource. ```python import flightctl from flightctl.models.enrollment_request import EnrollmentRequest -from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -479,15 +472,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | The name of the EnrollmentRequest resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + name = 'name_example' # str | The name of the EnrollmentRequest resource to get. try: - api_response = api_instance.patch_enrollment_request(name, patch_request_inner) - print("The response of EnrollmentrequestApi->patch_enrollment_request:\n") + api_response = api_instance.get_enrollment_request_status(name) + print("The response of EnrollmentrequestApi->get_enrollment_request_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnrollmentrequestApi->patch_enrollment_request: %s\n" % e) + print("Exception when calling EnrollmentrequestApi->get_enrollment_request_status: %s\n" % e) ``` @@ -497,8 +489,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the EnrollmentRequest resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **name** | **str**| The name of the EnrollmentRequest resource to get. | ### Return type @@ -510,7 +501,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -518,29 +509,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | -**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_enrollment_request_status** -> EnrollmentRequest patch_enrollment_request_status(name, patch_request_inner) +# **list_enrollment_requests** +> EnrollmentRequestList list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -Patch the status of an EnrollmentRequest resource. +List EnrollmentRequest resources. ### Example ```python import flightctl -from flightctl.models.enrollment_request import EnrollmentRequest -from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.enrollment_request_list import EnrollmentRequestList from flightctl.rest import ApiException from pprint import pprint @@ -555,15 +543,17 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | The name of the EnrollmentRequest resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) try: - api_response = api_instance.patch_enrollment_request_status(name, patch_request_inner) - print("The response of EnrollmentrequestApi->patch_enrollment_request_status:\n") + api_response = api_instance.list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of EnrollmentrequestApi->list_enrollment_requests:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnrollmentrequestApi->patch_enrollment_request_status: %s\n" % e) + print("Exception when calling EnrollmentrequestApi->list_enrollment_requests: %s\n" % e) ``` @@ -573,12 +563,14 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the EnrollmentRequest resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] ### Return type -[**EnrollmentRequest**](EnrollmentRequest.md) +[**EnrollmentRequestList**](EnrollmentRequestList.md) ### Authorization @@ -586,7 +578,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -597,18 +589,16 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | -**404** | NotFound | - | -**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_enrollment_request** -> EnrollmentRequest read_enrollment_request(name) +# **patch_enrollment_request** +> EnrollmentRequest patch_enrollment_request(name, patch_request_inner) -Get an EnrollmentRequest resource. +Patch an EnrollmentRequest resource. ### Example @@ -616,6 +606,7 @@ Get an EnrollmentRequest resource. ```python import flightctl from flightctl.models.enrollment_request import EnrollmentRequest +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -630,14 +621,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | The name of the EnrollmentRequest resource to get. + name = 'name_example' # str | The name of the EnrollmentRequest resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_enrollment_request(name) - print("The response of EnrollmentrequestApi->read_enrollment_request:\n") + api_response = api_instance.patch_enrollment_request(name, patch_request_inner) + print("The response of EnrollmentrequestApi->patch_enrollment_request:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnrollmentrequestApi->read_enrollment_request: %s\n" % e) + print("Exception when calling EnrollmentrequestApi->patch_enrollment_request: %s\n" % e) ``` @@ -647,7 +639,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the EnrollmentRequest resource to get. | + **name** | **str**| The name of the EnrollmentRequest resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -659,7 +652,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -667,19 +660,21 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_enrollment_request_status** -> EnrollmentRequest read_enrollment_request_status(name) +# **patch_enrollment_request_status** +> EnrollmentRequest patch_enrollment_request_status(name, patch_request_inner) -Get the status of an EnrollmentRequest resource. +Patch the status of an EnrollmentRequest resource. ### Example @@ -687,6 +682,7 @@ Get the status of an EnrollmentRequest resource. ```python import flightctl from flightctl.models.enrollment_request import EnrollmentRequest +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -701,14 +697,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | The name of the EnrollmentRequest resource to get. + name = 'name_example' # str | The name of the EnrollmentRequest resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_enrollment_request_status(name) - print("The response of EnrollmentrequestApi->read_enrollment_request_status:\n") + api_response = api_instance.patch_enrollment_request_status(name, patch_request_inner) + print("The response of EnrollmentrequestApi->patch_enrollment_request_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling EnrollmentrequestApi->read_enrollment_request_status: %s\n" % e) + print("Exception when calling EnrollmentrequestApi->patch_enrollment_request_status: %s\n" % e) ``` @@ -718,7 +715,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the EnrollmentRequest resource to get. | + **name** | **str**| The name of the EnrollmentRequest resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -730,7 +728,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -738,9 +736,11 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/FileContent.md b/docs/FileContent.md new file mode 100644 index 0000000..d054afe --- /dev/null +++ b/docs/FileContent.md @@ -0,0 +1,31 @@ +# FileContent + +The content of a file. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | The plain text (UTF-8) or base64-encoded content of the file. | [optional] +**content_encoding** | [**EncodingType**](EncodingType.md) | | [optional] + +## Example + +```python +from flightctl.models.file_content import FileContent + +# TODO update the JSON string below +json = "{}" +# create an instance of FileContent from a JSON string +file_content_instance = FileContent.from_json(json) +# print the JSON string representation of the object +print(FileContent.to_json()) + +# convert the object into a dict +file_content_dict = file_content_instance.to_dict() +# create an instance of FileContent from a dict +file_content_from_dict = FileContent.from_dict(file_content_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileMetadata.md b/docs/FileMetadata.md new file mode 100644 index 0000000..5e06c08 --- /dev/null +++ b/docs/FileMetadata.md @@ -0,0 +1,32 @@ +# FileMetadata + +File metadata. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **int** | The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. | [optional] +**user** | **str** | The file's owner, specified either as a name or numeric ID. Defaults to \"root\". | [optional] +**group** | **str** | The file's group, specified either as a name or numeric ID. Defaults to \"root\". | [optional] + +## Example + +```python +from flightctl.models.file_metadata import FileMetadata + +# TODO update the JSON string below +json = "{}" +# create an instance of FileMetadata from a JSON string +file_metadata_instance = FileMetadata.from_json(json) +# print the JSON string representation of the object +print(FileMetadata.to_json()) + +# convert the object into a dict +file_metadata_dict = file_metadata_instance.to_dict() +# create an instance of FileMetadata from a dict +file_metadata_from_dict = FileMetadata.from_dict(file_metadata_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FileSpec.md b/docs/FileSpec.md index 288b782..b57c7da 100644 --- a/docs/FileSpec.md +++ b/docs/FileSpec.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**path** | **str** | The absolute path to the file on the device. Note that any existing file will be overwritten. | **content** | **str** | The plain text (UTF-8) or base64-encoded content of the file. | -**content_encoding** | **str** | How the contents are encoded. Must be either \"plain\" or \"base64\". Defaults to \"plain\". | [optional] +**content_encoding** | [**EncodingType**](EncodingType.md) | | [optional] **mode** | **int** | The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. | [optional] **user** | **str** | The file's owner, specified either as a name or numeric ID. Defaults to \"root\". | [optional] **group** | **str** | The file's group, specified either as a name or numeric ID. Defaults to \"root\". | [optional] +**path** | **str** | The absolute path to a file on the system. Note that any existing file will be overwritten. | ## Example diff --git a/docs/FleetApi.md b/docs/FleetApi.md index 25f4998..34e693c 100644 --- a/docs/FleetApi.md +++ b/docs/FleetApi.md @@ -9,13 +9,13 @@ Method | HTTP request | Description [**delete_fleets**](FleetApi.md#delete_fleets) | **DELETE** /api/v1/fleets | [**delete_template_version**](FleetApi.md#delete_template_version) | **DELETE** /api/v1/fleets/{fleet}/templateversions/{name} | [**delete_template_versions**](FleetApi.md#delete_template_versions) | **DELETE** /api/v1/fleets/{fleet}/templateversions | +[**get_fleet**](FleetApi.md#get_fleet) | **GET** /api/v1/fleets/{name} | +[**get_fleet_status**](FleetApi.md#get_fleet_status) | **GET** /api/v1/fleets/{name}/status | +[**get_template_version**](FleetApi.md#get_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | [**list_fleets**](FleetApi.md#list_fleets) | **GET** /api/v1/fleets | [**list_template_versions**](FleetApi.md#list_template_versions) | **GET** /api/v1/fleets/{fleet}/templateversions | [**patch_fleet**](FleetApi.md#patch_fleet) | **PATCH** /api/v1/fleets/{name} | [**patch_fleet_status**](FleetApi.md#patch_fleet_status) | **PATCH** /api/v1/fleets/{name}/status | -[**read_fleet**](FleetApi.md#read_fleet) | **GET** /api/v1/fleets/{name} | -[**read_fleet_status**](FleetApi.md#read_fleet_status) | **GET** /api/v1/fleets/{name}/status | -[**read_template_version**](FleetApi.md#read_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | [**replace_fleet**](FleetApi.md#replace_fleet) | **PUT** /api/v1/fleets/{name} | [**replace_fleet_status**](FleetApi.md#replace_fleet_status) | **PUT** /api/v1/fleets/{name}/status | @@ -93,7 +93,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_fleet** -> Fleet delete_fleet(name) +> Status delete_fleet(name) @@ -104,7 +104,7 @@ Delete a Fleet resource. ```python import flightctl -from flightctl.models.fleet import Fleet +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -140,7 +140,7 @@ Name | Type | Description | Notes ### Return type -[**Fleet**](Fleet.md) +[**Status**](Status.md) ### Authorization @@ -230,7 +230,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_template_version** -> TemplateVersion delete_template_version(fleet, name) +> Status delete_template_version(fleet, name) @@ -241,7 +241,7 @@ delete a template version ```python import flightctl -from flightctl.models.template_version import TemplateVersion +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -279,7 +279,7 @@ Name | Type | Description | Notes ### Return type -[**TemplateVersion**](TemplateVersion.md) +[**Status**](Status.md) ### Authorization @@ -372,19 +372,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_fleets** -> FleetList list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, add_devices_summary=add_devices_summary) +# **get_fleet** +> Fleet get_fleet(name, add_devices_summary=add_devices_summary) -List Fleet resources. +Get a Fleet resource. ### Example ```python import flightctl -from flightctl.models.fleet_list import FleetList +from flightctl.models.fleet import Fleet from flightctl.rest import ApiException from pprint import pprint @@ -399,18 +399,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the Fleet resource to get. add_devices_summary = True # bool | Include a summary of the devices in the fleet. (optional) try: - api_response = api_instance.list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, add_devices_summary=add_devices_summary) - print("The response of FleetApi->list_fleets:\n") + api_response = api_instance.get_fleet(name, add_devices_summary=add_devices_summary) + print("The response of FleetApi->get_fleet:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->list_fleets: %s\n" % e) + print("Exception when calling FleetApi->get_fleet: %s\n" % e) ``` @@ -420,15 +417,12 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the Fleet resource to get. | **add_devices_summary** | **bool**| Include a summary of the devices in the fleet. | [optional] ### Return type -[**FleetList**](FleetList.md) +[**Fleet**](Fleet.md) ### Authorization @@ -444,26 +438,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_template_versions** -> TemplateVersionList list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) +# **get_fleet_status** +> Fleet get_fleet_status(name) -list template versions +read status of the specified Fleet ### Example ```python import flightctl -from flightctl.models.template_version_list import TemplateVersionList +from flightctl.models.fleet import Fleet from flightctl.rest import ApiException from pprint import pprint @@ -478,18 +472,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - fleet = 'fleet_example' # str | The owner of the template versions. - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the Fleet resource to get. try: - api_response = api_instance.list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - print("The response of FleetApi->list_template_versions:\n") + api_response = api_instance.get_fleet_status(name) + print("The response of FleetApi->get_fleet_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->list_template_versions: %s\n" % e) + print("Exception when calling FleetApi->get_fleet_status: %s\n" % e) ``` @@ -499,15 +489,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fleet** | **str**| The owner of the template versions. | - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the Fleet resource to get. | ### Return type -[**TemplateVersionList**](TemplateVersionList.md) +[**Fleet**](Fleet.md) ### Authorization @@ -523,27 +509,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_fleet** -> Fleet patch_fleet(name, patch_request_inner) +# **get_template_version** +> TemplateVersion get_template_version(fleet, name) -Patch a Fleet resource. +read the specified template version ### Example ```python import flightctl -from flightctl.models.fleet import Fleet -from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.template_version import TemplateVersion from flightctl.rest import ApiException from pprint import pprint @@ -558,15 +543,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | The name of the Fleet resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + fleet = 'fleet_example' # str | The owner of the template version. + name = 'name_example' # str | The name of the template version. try: - api_response = api_instance.patch_fleet(name, patch_request_inner) - print("The response of FleetApi->patch_fleet:\n") + api_response = api_instance.get_template_version(fleet, name) + print("The response of FleetApi->get_template_version:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->patch_fleet: %s\n" % e) + print("Exception when calling FleetApi->get_template_version: %s\n" % e) ``` @@ -576,12 +561,12 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Fleet resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **fleet** | **str**| The owner of the template version. | + **name** | **str**| The name of the template version. | ### Return type -[**Fleet**](Fleet.md) +[**TemplateVersion**](TemplateVersion.md) ### Authorization @@ -589,7 +574,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -597,29 +582,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | -**409** | StatusConflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_fleet_status** -> Fleet patch_fleet_status(name, patch_request_inner) +# **list_fleets** +> FleetList list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, add_devices_summary=add_devices_summary) -Patch the status of a Fleet resource. +List Fleet resources. ### Example ```python import flightctl -from flightctl.models.fleet import Fleet -from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.fleet_list import FleetList from flightctl.rest import ApiException from pprint import pprint @@ -634,15 +616,18 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | The name of the Fleet resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + add_devices_summary = True # bool | Include a summary of the devices in the fleet. (optional) try: - api_response = api_instance.patch_fleet_status(name, patch_request_inner) - print("The response of FleetApi->patch_fleet_status:\n") + api_response = api_instance.list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, add_devices_summary=add_devices_summary) + print("The response of FleetApi->list_fleets:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->patch_fleet_status: %s\n" % e) + print("Exception when calling FleetApi->list_fleets: %s\n" % e) ``` @@ -652,12 +637,15 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Fleet resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **add_devices_summary** | **bool**| Include a summary of the devices in the fleet. | [optional] ### Return type -[**Fleet**](Fleet.md) +[**FleetList**](FleetList.md) ### Authorization @@ -665,7 +653,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -676,24 +664,23 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | -**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_fleet** -> Fleet read_fleet(name, add_devices_summary=add_devices_summary) +# **list_template_versions** +> TemplateVersionList list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -Get a Fleet resource. +list template versions ### Example ```python import flightctl -from flightctl.models.fleet import Fleet +from flightctl.models.template_version_list import TemplateVersionList from flightctl.rest import ApiException from pprint import pprint @@ -708,15 +695,18 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | The name of the Fleet resource to get. - add_devices_summary = True # bool | Include a summary of the devices in the fleet. (optional) + fleet = 'fleet_example' # str | The owner of the template versions. + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) try: - api_response = api_instance.read_fleet(name, add_devices_summary=add_devices_summary) - print("The response of FleetApi->read_fleet:\n") + api_response = api_instance.list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of FleetApi->list_template_versions:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->read_fleet: %s\n" % e) + print("Exception when calling FleetApi->list_template_versions: %s\n" % e) ``` @@ -726,12 +716,15 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Fleet resource to get. | - **add_devices_summary** | **bool**| Include a summary of the devices in the fleet. | [optional] + **fleet** | **str**| The owner of the template versions. | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] ### Return type -[**Fleet**](Fleet.md) +[**TemplateVersionList**](TemplateVersionList.md) ### Authorization @@ -747,19 +740,19 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | -**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_fleet_status** -> Fleet read_fleet_status(name) +# **patch_fleet** +> Fleet patch_fleet(name, patch_request_inner) -read status of the specified Fleet +Patch a Fleet resource. ### Example @@ -767,6 +760,7 @@ read status of the specified Fleet ```python import flightctl from flightctl.models.fleet import Fleet +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -781,14 +775,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | The name of the Fleet resource to get. + name = 'name_example' # str | The name of the Fleet resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_fleet_status(name) - print("The response of FleetApi->read_fleet_status:\n") + api_response = api_instance.patch_fleet(name, patch_request_inner) + print("The response of FleetApi->patch_fleet:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->read_fleet_status: %s\n" % e) + print("Exception when calling FleetApi->patch_fleet: %s\n" % e) ``` @@ -798,7 +793,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Fleet resource to get. | + **name** | **str**| The name of the Fleet resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -810,7 +806,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -818,26 +814,29 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | StatusConflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_template_version** -> TemplateVersion read_template_version(fleet, name) +# **patch_fleet_status** +> Fleet patch_fleet_status(name, patch_request_inner) -read the specified template version +Patch the status of a Fleet resource. ### Example ```python import flightctl -from flightctl.models.template_version import TemplateVersion +from flightctl.models.fleet import Fleet +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.rest import ApiException from pprint import pprint @@ -852,15 +851,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - fleet = 'fleet_example' # str | The owner of the template version. - name = 'name_example' # str | The name of the template version. + name = 'name_example' # str | The name of the Fleet resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_template_version(fleet, name) - print("The response of FleetApi->read_template_version:\n") + api_response = api_instance.patch_fleet_status(name, patch_request_inner) + print("The response of FleetApi->patch_fleet_status:\n") pprint(api_response) except Exception as e: - print("Exception when calling FleetApi->read_template_version: %s\n" % e) + print("Exception when calling FleetApi->patch_fleet_status: %s\n" % e) ``` @@ -870,12 +869,12 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fleet** | **str**| The owner of the template version. | - **name** | **str**| The name of the template version. | + **name** | **str**| The name of the Fleet resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type -[**TemplateVersion**](TemplateVersion.md) +[**Fleet**](Fleet.md) ### Authorization @@ -883,7 +882,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -891,6 +890,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | diff --git a/docs/ImageApplicationProvider.md b/docs/ImageApplicationProvider.md deleted file mode 100644 index 756e886..0000000 --- a/docs/ImageApplicationProvider.md +++ /dev/null @@ -1,29 +0,0 @@ -# ImageApplicationProvider - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**image** | **str** | Reference to the container image for the application package. | - -## Example - -```python -from flightctl.models.image_application_provider import ImageApplicationProvider - -# TODO update the JSON string below -json = "{}" -# create an instance of ImageApplicationProvider from a JSON string -image_application_provider_instance = ImageApplicationProvider.from_json(json) -# print the JSON string representation of the object -print(ImageApplicationProvider.to_json()) - -# convert the object into a dict -image_application_provider_dict = image_application_provider_instance.to_dict() -# create an instance of ImageApplicationProvider from a dict -image_application_provider_from_dict = ImageApplicationProvider.from_dict(image_application_provider_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ImageApplicationProviderSpec.md b/docs/ImageApplicationProviderSpec.md new file mode 100644 index 0000000..708b811 --- /dev/null +++ b/docs/ImageApplicationProviderSpec.md @@ -0,0 +1,29 @@ +# ImageApplicationProviderSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **str** | Reference to the container image for the application package. | + +## Example + +```python +from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageApplicationProviderSpec from a JSON string +image_application_provider_spec_instance = ImageApplicationProviderSpec.from_json(json) +# print the JSON string representation of the object +print(ImageApplicationProviderSpec.to_json()) + +# convert the object into a dict +image_application_provider_spec_dict = image_application_provider_spec_instance.to_dict() +# create an instance of ImageApplicationProviderSpec from a dict +image_application_provider_spec_from_dict = ImageApplicationProviderSpec.from_dict(image_application_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineApplicationProviderSpec.md b/docs/InlineApplicationProviderSpec.md new file mode 100644 index 0000000..08763ad --- /dev/null +++ b/docs/InlineApplicationProviderSpec.md @@ -0,0 +1,29 @@ +# InlineApplicationProviderSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | + +## Example + +```python +from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of InlineApplicationProviderSpec from a JSON string +inline_application_provider_spec_instance = InlineApplicationProviderSpec.from_json(json) +# print the JSON string representation of the object +print(InlineApplicationProviderSpec.to_json()) + +# convert the object into a dict +inline_application_provider_spec_dict = inline_application_provider_spec_instance.to_dict() +# create an instance of InlineApplicationProviderSpec from a dict +inline_application_provider_spec_from_dict = InlineApplicationProviderSpec.from_dict(inline_application_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelsApi.md b/docs/LabelsApi.md new file mode 100644 index 0000000..63a49e9 --- /dev/null +++ b/docs/LabelsApi.md @@ -0,0 +1,85 @@ +# flightctl.LabelsApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**list_labels**](LabelsApi.md#list_labels) | **GET** /api/v1/labels | + + +# **list_labels** +> List[str] list_labels(kind, label_selector=label_selector, field_selector=field_selector, limit=limit) + + + +Retrieves a distinct list of labels for the specified resource type. + +### Example + + +```python +import flightctl +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.LabelsApi(api_client) + kind = 'kind_example' # str | The type of resource to retrieve labels from. + label_selector = 'label_selector_example' # str | A filter to retrieve labels only from resources that match the given label selector. (optional) + field_selector = 'field_selector_example' # str | A filter to retrieve labels only from resources that match the given field selector. (optional) + limit = 56 # int | The maximum number of distinct labels to return in the response. (optional) + + try: + api_response = api_instance.list_labels(kind, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of LabelsApi->list_labels:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsApi->list_labels: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **kind** | **str**| The type of resource to retrieve labels from. | + **label_selector** | **str**| A filter to retrieve labels only from resources that match the given label selector. | [optional] + **field_selector** | **str**| A filter to retrieve labels only from resources that match the given field selector. | [optional] + **limit** | **int**| The maximum number of distinct labels to return in the response. | [optional] + +### Return type + +**List[str]** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Not allowed | - | +**503** | ServiceUnavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RelativePath.md b/docs/RelativePath.md new file mode 100644 index 0000000..019c401 --- /dev/null +++ b/docs/RelativePath.md @@ -0,0 +1,30 @@ +# RelativePath + +Represents a relative file path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | A relative file path on the system. Note that any existing file will be overwritten. | [optional] + +## Example + +```python +from flightctl.models.relative_path import RelativePath + +# TODO update the JSON string below +json = "{}" +# create an instance of RelativePath from a JSON string +relative_path_instance = RelativePath.from_json(json) +# print the JSON string representation of the object +print(RelativePath.to_json()) + +# convert the object into a dict +relative_path_dict = relative_path_instance.to_dict() +# create an instance of RelativePath from a dict +relative_path_from_dict = RelativePath.from_dict(relative_path_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index 2243510..6314225 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -7,9 +7,9 @@ Method | HTTP request | Description [**create_repository**](RepositoryApi.md#create_repository) | **POST** /api/v1/repositories | [**delete_repositories**](RepositoryApi.md#delete_repositories) | **DELETE** /api/v1/repositories | [**delete_repository**](RepositoryApi.md#delete_repository) | **DELETE** /api/v1/repositories/{name} | +[**get_repository**](RepositoryApi.md#get_repository) | **GET** /api/v1/repositories/{name} | [**list_repositories**](RepositoryApi.md#list_repositories) | **GET** /api/v1/repositories | [**patch_repository**](RepositoryApi.md#patch_repository) | **PATCH** /api/v1/repositories/{name} | -[**read_repository**](RepositoryApi.md#read_repository) | **GET** /api/v1/repositories/{name} | [**replace_repository**](RepositoryApi.md#replace_repository) | **PUT** /api/v1/repositories/{name} | @@ -152,7 +152,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_repository** -> Repository delete_repository(name) +> Status delete_repository(name) @@ -163,7 +163,7 @@ Delete a Repository resource. ```python import flightctl -from flightctl.models.repository import Repository +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -199,7 +199,7 @@ Name | Type | Description | Notes ### Return type -[**Repository**](Repository.md) +[**Status**](Status.md) ### Authorization @@ -222,19 +222,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_repositories** -> RepositoryList list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) +# **get_repository** +> Repository get_repository(name) -List Repository resources. +Get a Repository resource. ### Example ```python import flightctl -from flightctl.models.repository_list import RepositoryList +from flightctl.models.repository import Repository from flightctl.rest import ApiException from pprint import pprint @@ -249,17 +249,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the Repository resource to get. try: - api_response = api_instance.list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - print("The response of RepositoryApi->list_repositories:\n") + api_response = api_instance.get_repository(name) + print("The response of RepositoryApi->get_repository:\n") pprint(api_response) except Exception as e: - print("Exception when calling RepositoryApi->list_repositories: %s\n" % e) + print("Exception when calling RepositoryApi->get_repository: %s\n" % e) ``` @@ -269,14 +266,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the Repository resource to get. | ### Return type -[**RepositoryList**](RepositoryList.md) +[**Repository**](Repository.md) ### Authorization @@ -292,27 +286,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_repository** -> Repository patch_repository(name, patch_request_inner) +# **list_repositories** +> RepositoryList list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -Patch a Repository resource. +List Repository resources. ### Example ```python import flightctl -from flightctl.models.patch_request_inner import PatchRequestInner -from flightctl.models.repository import Repository +from flightctl.models.repository_list import RepositoryList from flightctl.rest import ApiException from pprint import pprint @@ -327,15 +320,17 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | The name of the Repository resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) try: - api_response = api_instance.patch_repository(name, patch_request_inner) - print("The response of RepositoryApi->patch_repository:\n") + api_response = api_instance.list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of RepositoryApi->list_repositories:\n") pprint(api_response) except Exception as e: - print("Exception when calling RepositoryApi->patch_repository: %s\n" % e) + print("Exception when calling RepositoryApi->list_repositories: %s\n" % e) ``` @@ -345,12 +340,14 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Repository resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] ### Return type -[**Repository**](Repository.md) +[**RepositoryList**](RepositoryList.md) ### Authorization @@ -358,7 +355,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -369,24 +366,23 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | -**404** | NotFound | - | -**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_repository** -> Repository read_repository(name) +# **patch_repository** +> Repository patch_repository(name, patch_request_inner) -Get a Repository resource. +Patch a Repository resource. ### Example ```python import flightctl +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.repository import Repository from flightctl.rest import ApiException from pprint import pprint @@ -402,14 +398,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | The name of the Repository resource to get. + name = 'name_example' # str | The name of the Repository resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_repository(name) - print("The response of RepositoryApi->read_repository:\n") + api_response = api_instance.patch_repository(name, patch_request_inner) + print("The response of RepositoryApi->patch_repository:\n") pprint(api_response) except Exception as e: - print("Exception when calling RepositoryApi->read_repository: %s\n" % e) + print("Exception when calling RepositoryApi->patch_repository: %s\n" % e) ``` @@ -419,7 +416,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the Repository resource to get. | + **name** | **str**| The name of the Repository resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -431,7 +429,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -439,9 +437,11 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ResourcesyncApi.md b/docs/ResourcesyncApi.md index a3ad4b3..5561813 100644 --- a/docs/ResourcesyncApi.md +++ b/docs/ResourcesyncApi.md @@ -7,9 +7,9 @@ Method | HTTP request | Description [**create_resource_sync**](ResourcesyncApi.md#create_resource_sync) | **POST** /api/v1/resourcesyncs | [**delete_resource_sync**](ResourcesyncApi.md#delete_resource_sync) | **DELETE** /api/v1/resourcesyncs/{name} | [**delete_resource_syncs**](ResourcesyncApi.md#delete_resource_syncs) | **DELETE** /api/v1/resourcesyncs | -[**list_resource_sync**](ResourcesyncApi.md#list_resource_sync) | **GET** /api/v1/resourcesyncs | +[**get_resource_sync**](ResourcesyncApi.md#get_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | +[**list_resource_syncs**](ResourcesyncApi.md#list_resource_syncs) | **GET** /api/v1/resourcesyncs | [**patch_resource_sync**](ResourcesyncApi.md#patch_resource_sync) | **PATCH** /api/v1/resourcesyncs/{name} | -[**read_resource_sync**](ResourcesyncApi.md#read_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | [**replace_resource_sync**](ResourcesyncApi.md#replace_resource_sync) | **PUT** /api/v1/resourcesyncs/{name} | @@ -86,7 +86,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **delete_resource_sync** -> ResourceSync delete_resource_sync(name) +> Status delete_resource_sync(name) @@ -97,7 +97,7 @@ Delete a ResourceSync resource. ```python import flightctl -from flightctl.models.resource_sync import ResourceSync +from flightctl.models.status import Status from flightctl.rest import ApiException from pprint import pprint @@ -133,7 +133,7 @@ Name | Type | Description | Notes ### Return type -[**ResourceSync**](ResourceSync.md) +[**Status**](Status.md) ### Authorization @@ -222,19 +222,19 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **list_resource_sync** -> ResourceSyncList list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) +# **get_resource_sync** +> ResourceSync get_resource_sync(name) -List ResourceSync resources. +Get a ResourceSync resource. ### Example ```python import flightctl -from flightctl.models.resource_sync_list import ResourceSyncList +from flightctl.models.resource_sync import ResourceSync from flightctl.rest import ApiException from pprint import pprint @@ -249,17 +249,14 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) - label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) - limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + name = 'name_example' # str | The name of the ResourceSync resource to get. try: - api_response = api_instance.list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - print("The response of ResourcesyncApi->list_resource_sync:\n") + api_response = api_instance.get_resource_sync(name) + print("The response of ResourcesyncApi->get_resource_sync:\n") pprint(api_response) except Exception as e: - print("Exception when calling ResourcesyncApi->list_resource_sync: %s\n" % e) + print("Exception when calling ResourcesyncApi->get_resource_sync: %s\n" % e) ``` @@ -269,14 +266,11 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] - **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] - **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + **name** | **str**| The name of the ResourceSync resource to get. | ### Return type -[**ResourceSyncList**](ResourceSyncList.md) +[**ResourceSync**](ResourceSync.md) ### Authorization @@ -292,27 +286,26 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | +**404** | NotFound | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **patch_resource_sync** -> ResourceSync patch_resource_sync(name, patch_request_inner) +# **list_resource_syncs** +> ResourceSyncList list_resource_syncs(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -Patch a ResourceSync resource. +List ResourceSync resources. ### Example ```python import flightctl -from flightctl.models.patch_request_inner import PatchRequestInner -from flightctl.models.resource_sync import ResourceSync +from flightctl.models.resource_sync_list import ResourceSyncList from flightctl.rest import ApiException from pprint import pprint @@ -327,15 +320,17 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | The name of the ResourceSync resource to patch. - patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) try: - api_response = api_instance.patch_resource_sync(name, patch_request_inner) - print("The response of ResourcesyncApi->patch_resource_sync:\n") + api_response = api_instance.list_resource_syncs(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of ResourcesyncApi->list_resource_syncs:\n") pprint(api_response) except Exception as e: - print("Exception when calling ResourcesyncApi->patch_resource_sync: %s\n" % e) + print("Exception when calling ResourcesyncApi->list_resource_syncs: %s\n" % e) ``` @@ -345,12 +340,14 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the ResourceSync resource to patch. | - **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] ### Return type -[**ResourceSync**](ResourceSync.md) +[**ResourceSyncList**](ResourceSyncList.md) ### Authorization @@ -358,7 +355,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json-patch+json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details @@ -369,24 +366,23 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | -**404** | NotFound | - | -**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **read_resource_sync** -> ResourceSync read_resource_sync(name) +# **patch_resource_sync** +> ResourceSync patch_resource_sync(name, patch_request_inner) -Get a ResourceSync resource. +Patch a ResourceSync resource. ### Example ```python import flightctl +from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.resource_sync import ResourceSync from flightctl.rest import ApiException from pprint import pprint @@ -402,14 +398,15 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | The name of the ResourceSync resource to get. + name = 'name_example' # str | The name of the ResourceSync resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | try: - api_response = api_instance.read_resource_sync(name) - print("The response of ResourcesyncApi->read_resource_sync:\n") + api_response = api_instance.patch_resource_sync(name, patch_request_inner) + print("The response of ResourcesyncApi->patch_resource_sync:\n") pprint(api_response) except Exception as e: - print("Exception when calling ResourcesyncApi->read_resource_sync: %s\n" % e) + print("Exception when calling ResourcesyncApi->patch_resource_sync: %s\n" % e) ``` @@ -419,7 +416,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| The name of the ResourceSync resource to get. | + **name** | **str**| The name of the ResourceSync resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | ### Return type @@ -431,7 +429,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json-patch+json - **Accept**: application/json ### HTTP response details @@ -439,9 +437,11 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | +**400** | Bad Request | - | **401** | Unauthorized | - | **403** | Forbidden | - | **404** | NotFound | - | +**409** | Conflict | - | **503** | ServiceUnavailable | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/flightctl/__init__.py b/flightctl/__init__.py index db5ed40..937dbf7 100644 --- a/flightctl/__init__.py +++ b/flightctl/__init__.py @@ -23,6 +23,7 @@ from flightctl.api.device_api import DeviceApi from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi from flightctl.api.fleet_api import FleetApi +from flightctl.api.labels_api import LabelsApi from flightctl.api.repository_api import RepositoryApi from flightctl.api.resourcesync_api import ResourcesyncApi from flightctl.api.version_api import VersionApi @@ -39,6 +40,9 @@ from flightctl.exceptions import ApiException # import models into sdk package +from flightctl.models.absolute_path import AbsolutePath +from flightctl.models.app_type import AppType +from flightctl.models.application_content import ApplicationContent from flightctl.models.application_env_vars import ApplicationEnvVars from flightctl.models.application_provider_spec import ApplicationProviderSpec from flightctl.models.application_status_type import ApplicationStatusType @@ -86,6 +90,7 @@ from flightctl.models.devices_summary import DevicesSummary from flightctl.models.disk_resource_monitor_spec import DiskResourceMonitorSpec from flightctl.models.disruption_budget import DisruptionBudget +from flightctl.models.encoding_type import EncodingType from flightctl.models.enrollment_config import EnrollmentConfig from flightctl.models.enrollment_request import EnrollmentRequest from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval @@ -96,6 +101,8 @@ from flightctl.models.enrollment_service import EnrollmentService from flightctl.models.enrollment_service_auth import EnrollmentServiceAuth from flightctl.models.enrollment_service_service import EnrollmentServiceService +from flightctl.models.file_content import FileContent +from flightctl.models.file_metadata import FileMetadata from flightctl.models.file_operation import FileOperation from flightctl.models.file_spec import FileSpec from flightctl.models.fleet import Fleet @@ -115,7 +122,8 @@ from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef from flightctl.models.http_repo_spec import HttpRepoSpec -from flightctl.models.image_application_provider import ImageApplicationProvider +from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec +from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec from flightctl.models.kubernetes_secret_provider_spec_secret_ref import KubernetesSecretProviderSpecSecretRef @@ -125,6 +133,7 @@ from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec from flightctl.models.object_meta import ObjectMeta from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.relative_path import RelativePath from flightctl.models.repo_spec_type import RepoSpecType from flightctl.models.repository import Repository from flightctl.models.repository_list import RepositoryList diff --git a/flightctl/api/__init__.py b/flightctl/api/__init__.py index 483be9c..c086957 100644 --- a/flightctl/api/__init__.py +++ b/flightctl/api/__init__.py @@ -6,6 +6,7 @@ from flightctl.api.device_api import DeviceApi from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi from flightctl.api.fleet_api import FleetApi +from flightctl.api.labels_api import LabelsApi from flightctl.api.repository_api import RepositoryApi from flightctl.api.resourcesync_api import ResourcesyncApi from flightctl.api.version_api import VersionApi diff --git a/flightctl/api/authentication_api.py b/flightctl/api/authentication_api.py index 5cb5625..b68bb95 100644 --- a/flightctl/api/authentication_api.py +++ b/flightctl/api/authentication_api.py @@ -21,6 +21,7 @@ from typing import Optional from typing_extensions import Annotated from flightctl.models.auth_config import AuthConfig +from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized from flightctl.api_response import ApiResponse @@ -91,7 +92,7 @@ def auth_config( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", - '418': None, + '418': "Status", } response_data = self.api_client.call_api( *_param, @@ -155,7 +156,7 @@ def auth_config_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", - '418': None, + '418': "Status", } response_data = self.api_client.call_api( *_param, @@ -219,7 +220,7 @@ def auth_config_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", - '418': None, + '418': "Status", } response_data = self.api_client.call_api( *_param, @@ -304,7 +305,7 @@ def auth_validate( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> Status: """auth_validate Validate an authentication token. @@ -342,9 +343,10 @@ def auth_validate( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '418': None, + '200': "Status", + '400': "Status", + '401': "Status", + '418': "Status", '500': "Status", } response_data = self.api_client.call_api( @@ -374,7 +376,7 @@ def auth_validate_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[Status]: """auth_validate Validate an authentication token. @@ -412,9 +414,10 @@ def auth_validate_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '418': None, + '200': "Status", + '400': "Status", + '401': "Status", + '418': "Status", '500': "Status", } response_data = self.api_client.call_api( @@ -482,9 +485,10 @@ def auth_validate_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '401': None, - '418': None, + '200': "Status", + '400': "Status", + '401': "Status", + '418': "Status", '500': "Status", } response_data = self.api_client.call_api( diff --git a/flightctl/api/certificatesigningrequest_api.py b/flightctl/api/certificatesigningrequest_api.py index 4f1cf51..d9c861b 100644 --- a/flightctl/api/certificatesigningrequest_api.py +++ b/flightctl/api/certificatesigningrequest_api.py @@ -347,7 +347,7 @@ def delete_certificate_signing_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CertificateSigningRequest: + ) -> Status: """delete_certificate_signing_request delete a Certificate Signing Request @@ -385,7 +385,7 @@ def delete_certificate_signing_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -418,7 +418,7 @@ def delete_certificate_signing_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CertificateSigningRequest]: + ) -> ApiResponse[Status]: """delete_certificate_signing_request delete a Certificate Signing Request @@ -456,7 +456,7 @@ def delete_certificate_signing_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -527,7 +527,7 @@ def delete_certificate_signing_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -858,12 +858,9 @@ def _delete_certificate_signing_requests_serialize( @validate_call - def list_certificate_signing_requests( + def get_certificate_signing_request( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -876,19 +873,13 @@ def list_certificate_signing_requests( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CertificateSigningRequestList: - """list_certificate_signing_requests + ) -> CertificateSigningRequest: + """get_certificate_signing_request - List CertificateSigningRequest resources. + read the specified certificateSigningRequest - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the CertificateSigningRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -911,11 +902,8 @@ def list_certificate_signing_requests( :return: Returns the result object. """ # noqa: E501 - _param = self._list_certificate_signing_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_certificate_signing_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -923,10 +911,10 @@ def list_certificate_signing_requests( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequestList", - '400': "Status", + '200': "CertificateSigningRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -941,12 +929,9 @@ def list_certificate_signing_requests( @validate_call - def list_certificate_signing_requests_with_http_info( + def get_certificate_signing_request_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -959,19 +944,13 @@ def list_certificate_signing_requests_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CertificateSigningRequestList]: - """list_certificate_signing_requests + ) -> ApiResponse[CertificateSigningRequest]: + """get_certificate_signing_request - List CertificateSigningRequest resources. + read the specified certificateSigningRequest - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the CertificateSigningRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -994,11 +973,8 @@ def list_certificate_signing_requests_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_certificate_signing_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_certificate_signing_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1006,10 +982,10 @@ def list_certificate_signing_requests_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequestList", - '400': "Status", + '200': "CertificateSigningRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1024,12 +1000,9 @@ def list_certificate_signing_requests_with_http_info( @validate_call - def list_certificate_signing_requests_without_preload_content( + def get_certificate_signing_request_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1043,18 +1016,12 @@ def list_certificate_signing_requests_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_certificate_signing_requests + """get_certificate_signing_request - List CertificateSigningRequest resources. + read the specified certificateSigningRequest - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the CertificateSigningRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1077,11 +1044,8 @@ def list_certificate_signing_requests_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_certificate_signing_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_certificate_signing_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1089,10 +1053,10 @@ def list_certificate_signing_requests_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequestList", - '400': "Status", + '200': "CertificateSigningRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1102,12 +1066,9 @@ def list_certificate_signing_requests_without_preload_content( return response_data.response - def _list_certificate_signing_requests_serialize( + def _get_certificate_signing_request_serialize( self, - var_continue, - label_selector, - field_selector, - limit, + name, _request_auth, _content_type, _headers, @@ -1129,23 +1090,9 @@ def _list_certificate_signing_requests_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -1166,7 +1113,7 @@ def _list_certificate_signing_requests_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/certificatesigningrequests', + resource_path='/api/v1/certificatesigningrequests/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1183,10 +1130,12 @@ def _list_certificate_signing_requests_serialize( @validate_call - def patch_certificate_signing_request( + def list_certificate_signing_requests( self, - name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1199,15 +1148,19 @@ def patch_certificate_signing_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CertificateSigningRequest: - """patch_certificate_signing_request + ) -> CertificateSigningRequestList: + """list_certificate_signing_requests - Patch a CertificateSigningRequest resource. + List CertificateSigningRequest resources. - :param name: The name of the CertificateSigningRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1230,9 +1183,11 @@ def patch_certificate_signing_request( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_certificate_signing_request_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_certificate_signing_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1240,12 +1195,10 @@ def patch_certificate_signing_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "CertificateSigningRequestList", '400': "Status", '401': "Status", - '404': "Status", '403': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1260,10 +1213,12 @@ def patch_certificate_signing_request( @validate_call - def patch_certificate_signing_request_with_http_info( + def list_certificate_signing_requests_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1276,15 +1231,19 @@ def patch_certificate_signing_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CertificateSigningRequest]: - """patch_certificate_signing_request + ) -> ApiResponse[CertificateSigningRequestList]: + """list_certificate_signing_requests - Patch a CertificateSigningRequest resource. + List CertificateSigningRequest resources. - :param name: The name of the CertificateSigningRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1307,9 +1266,11 @@ def patch_certificate_signing_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_certificate_signing_request_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_certificate_signing_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1317,12 +1278,10 @@ def patch_certificate_signing_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "CertificateSigningRequestList", '400': "Status", '401': "Status", - '404': "Status", '403': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1337,10 +1296,12 @@ def patch_certificate_signing_request_with_http_info( @validate_call - def patch_certificate_signing_request_without_preload_content( + def list_certificate_signing_requests_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1354,14 +1315,18 @@ def patch_certificate_signing_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_certificate_signing_request + """list_certificate_signing_requests - Patch a CertificateSigningRequest resource. + List CertificateSigningRequest resources. - :param name: The name of the CertificateSigningRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1384,9 +1349,11 @@ def patch_certificate_signing_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_certificate_signing_request_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_certificate_signing_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1394,12 +1361,10 @@ def patch_certificate_signing_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", + '200': "CertificateSigningRequestList", '400': "Status", '401': "Status", - '404': "Status", '403': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1409,10 +1374,12 @@ def patch_certificate_signing_request_without_preload_content( return response_data.response - def _patch_certificate_signing_request_serialize( + def _list_certificate_signing_requests_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, _request_auth, _content_type, _headers, @@ -1422,7 +1389,6 @@ def _patch_certificate_signing_request_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1435,14 +1401,26 @@ def _patch_certificate_signing_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1453,27 +1431,14 @@ def _patch_certificate_signing_request_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/certificatesigningrequests/{name}', + method='GET', + resource_path='/api/v1/certificatesigningrequests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1490,9 +1455,10 @@ def _patch_certificate_signing_request_serialize( @validate_call - def read_certificate_signing_request( + def patch_certificate_signing_request( self, - name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1506,12 +1472,14 @@ def read_certificate_signing_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CertificateSigningRequest: - """read_certificate_signing_request + """patch_certificate_signing_request - read the specified certificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: The name of the CertificateSigningRequest resource to get. (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1534,8 +1502,9 @@ def read_certificate_signing_request( :return: Returns the result object. """ # noqa: E501 - _param = self._read_certificate_signing_request_serialize( + _param = self._patch_certificate_signing_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1544,9 +1513,11 @@ def read_certificate_signing_request( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", + '400': "Status", '401': "Status", - '403': "Status", '404': "Status", + '403': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1561,9 +1532,10 @@ def read_certificate_signing_request( @validate_call - def read_certificate_signing_request_with_http_info( + def patch_certificate_signing_request_with_http_info( self, - name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1577,12 +1549,14 @@ def read_certificate_signing_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CertificateSigningRequest]: - """read_certificate_signing_request + """patch_certificate_signing_request - read the specified certificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: The name of the CertificateSigningRequest resource to get. (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1605,8 +1579,9 @@ def read_certificate_signing_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_certificate_signing_request_serialize( + _param = self._patch_certificate_signing_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1615,9 +1590,11 @@ def read_certificate_signing_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", + '400': "Status", '401': "Status", - '403': "Status", '404': "Status", + '403': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1632,9 +1609,10 @@ def read_certificate_signing_request_with_http_info( @validate_call - def read_certificate_signing_request_without_preload_content( + def patch_certificate_signing_request_without_preload_content( self, - name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1648,12 +1626,14 @@ def read_certificate_signing_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_certificate_signing_request + """patch_certificate_signing_request - read the specified certificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: The name of the CertificateSigningRequest resource to get. (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1676,8 +1656,9 @@ def read_certificate_signing_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_certificate_signing_request_serialize( + _param = self._patch_certificate_signing_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1686,9 +1667,11 @@ def read_certificate_signing_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", + '400': "Status", '401': "Status", - '403': "Status", '404': "Status", + '403': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1698,9 +1681,10 @@ def read_certificate_signing_request_without_preload_content( return response_data.response - def _read_certificate_signing_request_serialize( + def _patch_certificate_signing_request_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -1710,6 +1694,7 @@ def _read_certificate_signing_request_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1728,6 +1713,8 @@ def _read_certificate_signing_request_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1738,13 +1725,26 @@ def _read_certificate_signing_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/certificatesigningrequests/{name}', path_params=_path_params, query_params=_query_params, diff --git a/flightctl/api/device_api.py b/flightctl/api/device_api.py index 6037aae..aa198c6 100644 --- a/flightctl/api/device_api.py +++ b/flightctl/api/device_api.py @@ -651,7 +651,7 @@ def delete_device( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Device: + ) -> Status: """delete_device Delete a Device resource. @@ -689,7 +689,7 @@ def delete_device( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -722,7 +722,7 @@ def delete_device_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Device]: + ) -> ApiResponse[Status]: """delete_device Delete a Device resource. @@ -760,7 +760,7 @@ def delete_device_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -831,7 +831,7 @@ def delete_device_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -1162,10 +1162,9 @@ def _delete_devices_serialize( @validate_call - def get_rendered_device( + def get_device( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1179,14 +1178,12 @@ def get_rendered_device( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Device: - """get_rendered_device + """get_device - Get the rendered device. + Get a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1209,9 +1206,8 @@ def get_rendered_device( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1220,11 +1216,9 @@ def get_rendered_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1239,10 +1233,9 @@ def get_rendered_device( @validate_call - def get_rendered_device_with_http_info( + def get_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1256,14 +1249,12 @@ def get_rendered_device_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Device]: - """get_rendered_device + """get_device - Get the rendered device. + Get a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1286,9 +1277,8 @@ def get_rendered_device_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1297,11 +1287,9 @@ def get_rendered_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1316,10 +1304,9 @@ def get_rendered_device_with_http_info( @validate_call - def get_rendered_device_without_preload_content( + def get_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1333,14 +1320,12 @@ def get_rendered_device_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_rendered_device + """get_device - Get the rendered device. + Get a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1363,9 +1348,8 @@ def get_rendered_device_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1374,11 +1358,9 @@ def get_rendered_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1388,10 +1370,9 @@ def get_rendered_device_without_preload_content( return response_data.response - def _get_rendered_device_serialize( + def _get_device_serialize( self, name, - known_rendered_version, _request_auth, _content_type, _headers, @@ -1416,10 +1397,6 @@ def _get_rendered_device_serialize( if name is not None: _path_params['name'] = name # process the query parameters - if known_rendered_version is not None: - - _query_params.append(('knownRenderedVersion', known_rendered_version)) - # process the header parameters # process the form parameters # process the body parameter @@ -1440,7 +1417,7 @@ def _get_rendered_device_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/devices/{name}/rendered', + resource_path='/api/v1/devices/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1457,13 +1434,9 @@ def _get_rendered_device_serialize( @validate_call - def list_devices( + def get_device_status( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1476,21 +1449,13 @@ def list_devices( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeviceList: - """list_devices + ) -> Device: + """get_device_status - List Device resources. + Get the status of a Device resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int - :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool + :param name: The name of the Device resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1513,12 +1478,8 @@ def list_devices( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, + _param = self._get_device_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1526,10 +1487,10 @@ def list_devices( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", - '400': "Status", + '200': "Device", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1544,13 +1505,9 @@ def list_devices( @validate_call - def list_devices_with_http_info( + def get_device_status_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1563,21 +1520,13 @@ def list_devices_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeviceList]: - """list_devices + ) -> ApiResponse[Device]: + """get_device_status - List Device resources. + Get the status of a Device resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int - :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool + :param name: The name of the Device resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1600,12 +1549,8 @@ def list_devices_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, + _param = self._get_device_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1613,10 +1558,10 @@ def list_devices_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", - '400': "Status", + '200': "Device", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1631,13 +1576,9 @@ def list_devices_with_http_info( @validate_call - def list_devices_without_preload_content( + def get_device_status_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1651,20 +1592,12 @@ def list_devices_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_devices + """get_device_status - List Device resources. + Get the status of a Device resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int - :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool + :param name: The name of the Device resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1687,12 +1620,8 @@ def list_devices_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, + _param = self._get_device_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1700,10 +1629,10 @@ def list_devices_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", - '400': "Status", + '200': "Device", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1713,13 +1642,9 @@ def list_devices_without_preload_content( return response_data.response - def _list_devices_serialize( + def _get_device_status_serialize( self, - var_continue, - label_selector, - field_selector, - limit, - summary_only, + name, _request_auth, _content_type, _headers, @@ -1741,27 +1666,9 @@ def _list_devices_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if summary_only is not None: - - _query_params.append(('summaryOnly', summary_only)) - # process the header parameters # process the form parameters # process the body parameter @@ -1782,7 +1689,7 @@ def _list_devices_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/devices', + resource_path='/api/v1/devices/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1799,10 +1706,10 @@ def _list_devices_serialize( @validate_call - def patch_device( + def get_rendered_device( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1816,14 +1723,14 @@ def patch_device( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Device: - """patch_device + """get_rendered_device - Patch a Device resource. + Get the rendered device. - :param name: The name of the Device resource to patch. (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1846,9 +1753,9 @@ def patch_device( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_serialize( + _param = self._get_rendered_device_serialize( name=name, - patch_request_inner=patch_request_inner, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1857,7 +1764,7 @@ def patch_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '400': "Status", + '204': None, '401': "Status", '403': "Status", '404': "Status", @@ -1876,10 +1783,10 @@ def patch_device( @validate_call - def patch_device_with_http_info( + def get_rendered_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1893,14 +1800,14 @@ def patch_device_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Device]: - """patch_device + """get_rendered_device - Patch a Device resource. + Get the rendered device. - :param name: The name of the Device resource to patch. (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1923,9 +1830,9 @@ def patch_device_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_serialize( + _param = self._get_rendered_device_serialize( name=name, - patch_request_inner=patch_request_inner, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1934,7 +1841,7 @@ def patch_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '400': "Status", + '204': None, '401': "Status", '403': "Status", '404': "Status", @@ -1953,10 +1860,10 @@ def patch_device_with_http_info( @validate_call - def patch_device_without_preload_content( + def get_rendered_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1970,15 +1877,15 @@ def patch_device_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_device + """get_rendered_device - Patch a Device resource. + Get the rendered device. - :param name: The name of the Device resource to patch. (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] - :param _request_timeout: timeout setting for this request. If one + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: str + :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. @@ -2000,9 +1907,9 @@ def patch_device_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_serialize( + _param = self._get_rendered_device_serialize( name=name, - patch_request_inner=patch_request_inner, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2011,7 +1918,7 @@ def patch_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '400': "Status", + '204': None, '401': "Status", '403': "Status", '404': "Status", @@ -2025,10 +1932,10 @@ def patch_device_without_preload_content( return response_data.response - def _patch_device_serialize( + def _get_rendered_device_serialize( self, name, - patch_request_inner, + known_rendered_version, _request_auth, _content_type, _headers, @@ -2038,7 +1945,6 @@ def _patch_device_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2054,11 +1960,13 @@ def _patch_device_serialize( if name is not None: _path_params['name'] = name # process the query parameters + if known_rendered_version is not None: + + _query_params.append(('knownRenderedVersion', known_rendered_version)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2069,27 +1977,14 @@ def _patch_device_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/devices/{name}', + method='GET', + resource_path='/api/v1/devices/{name}/rendered', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2106,10 +2001,13 @@ def _patch_device_serialize( @validate_call - def patch_device_status( + def list_devices( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2122,15 +2020,21 @@ def patch_device_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Device: - """patch_device_status + ) -> DeviceList: + """list_devices - Patch the status of a Device resource. + List Device resources. - :param name: The name of the Device resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2153,9 +2057,12 @@ def patch_device_status( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2163,11 +2070,10 @@ def patch_device_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2182,10 +2088,13 @@ def patch_device_status( @validate_call - def patch_device_status_with_http_info( + def list_devices_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2198,15 +2107,21 @@ def patch_device_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Device]: - """patch_device_status + ) -> ApiResponse[DeviceList]: + """list_devices - Patch the status of a Device resource. + List Device resources. - :param name: The name of the Device resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2229,9 +2144,12 @@ def patch_device_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2239,11 +2157,10 @@ def patch_device_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2258,10 +2175,13 @@ def patch_device_status_with_http_info( @validate_call - def patch_device_status_without_preload_content( + def list_devices_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2275,14 +2195,20 @@ def patch_device_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_device_status + """list_devices - Patch the status of a Device resource. + List Device resources. - :param name: The name of the Device resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2305,9 +2231,12 @@ def patch_device_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_device_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2315,11 +2244,10 @@ def patch_device_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2329,10 +2257,13 @@ def patch_device_status_without_preload_content( return response_data.response - def _patch_device_status_serialize( + def _list_devices_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, + summary_only, _request_auth, _content_type, _headers, @@ -2342,7 +2273,6 @@ def _patch_device_status_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2355,14 +2285,30 @@ def _patch_device_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if summary_only is not None: + + _query_params.append(('summaryOnly', summary_only)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2373,27 +2319,14 @@ def _patch_device_status_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/devices/{name}/status', + method='GET', + resource_path='/api/v1/devices', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2410,9 +2343,10 @@ def _patch_device_status_serialize( @validate_call - def read_device( + def patch_device( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2426,12 +2360,14 @@ def read_device( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Device: - """read_device + """patch_device - Get a Device resource. + Patch a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2454,8 +2390,9 @@ def read_device( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_serialize( + _param = self._patch_device_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2464,9 +2401,11 @@ def read_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2481,9 +2420,10 @@ def read_device( @validate_call - def read_device_with_http_info( + def patch_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2497,12 +2437,14 @@ def read_device_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Device]: - """read_device + """patch_device - Get a Device resource. + Patch a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2525,8 +2467,9 @@ def read_device_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_serialize( + _param = self._patch_device_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2535,9 +2478,11 @@ def read_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2552,9 +2497,10 @@ def read_device_with_http_info( @validate_call - def read_device_without_preload_content( + def patch_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2568,12 +2514,14 @@ def read_device_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_device + """patch_device - Get a Device resource. + Patch a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2596,8 +2544,9 @@ def read_device_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_serialize( + _param = self._patch_device_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2606,9 +2555,11 @@ def read_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2618,9 +2569,10 @@ def read_device_without_preload_content( return response_data.response - def _read_device_serialize( + def _patch_device_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -2630,6 +2582,7 @@ def _read_device_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2648,6 +2601,8 @@ def _read_device_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2658,13 +2613,26 @@ def _read_device_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/devices/{name}', path_params=_path_params, query_params=_query_params, @@ -2682,9 +2650,10 @@ def _read_device_serialize( @validate_call - def read_device_status( + def patch_device_status( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2698,12 +2667,14 @@ def read_device_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Device: - """read_device_status + """patch_device_status - Get the status of a Device resource. + Patch the status of a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2726,8 +2697,9 @@ def read_device_status( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_status_serialize( + _param = self._patch_device_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2736,6 +2708,7 @@ def read_device_status( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -2753,9 +2726,10 @@ def read_device_status( @validate_call - def read_device_status_with_http_info( + def patch_device_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2769,12 +2743,14 @@ def read_device_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Device]: - """read_device_status + """patch_device_status - Get the status of a Device resource. + Patch the status of a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2797,8 +2773,9 @@ def read_device_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_status_serialize( + _param = self._patch_device_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2807,6 +2784,7 @@ def read_device_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -2824,9 +2802,10 @@ def read_device_status_with_http_info( @validate_call - def read_device_status_without_preload_content( + def patch_device_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2840,12 +2819,14 @@ def read_device_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_device_status + """patch_device_status - Get the status of a Device resource. + Patch the status of a Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2868,8 +2849,9 @@ def read_device_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_device_status_serialize( + _param = self._patch_device_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2878,6 +2860,7 @@ def read_device_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -2890,9 +2873,10 @@ def read_device_status_without_preload_content( return response_data.response - def _read_device_status_serialize( + def _patch_device_status_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -2902,6 +2886,7 @@ def _read_device_status_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2920,6 +2905,8 @@ def _read_device_status_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2930,13 +2917,26 @@ def _read_device_status_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/devices/{name}/status', path_params=_path_params, query_params=_query_params, diff --git a/flightctl/api/enrollmentrequest_api.py b/flightctl/api/enrollmentrequest_api.py index a0d437e..2eeb0f3 100644 --- a/flightctl/api/enrollmentrequest_api.py +++ b/flightctl/api/enrollmentrequest_api.py @@ -653,7 +653,7 @@ def delete_enrollment_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EnrollmentRequest: + ) -> Status: """delete_enrollment_request Delete an EnrollmentRequest resource. @@ -691,7 +691,7 @@ def delete_enrollment_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -724,7 +724,7 @@ def delete_enrollment_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EnrollmentRequest]: + ) -> ApiResponse[Status]: """delete_enrollment_request Delete an EnrollmentRequest resource. @@ -762,7 +762,7 @@ def delete_enrollment_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -833,7 +833,7 @@ def delete_enrollment_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -1441,12 +1441,9 @@ def _get_enrollment_config_serialize( @validate_call - def list_enrollment_requests( + def get_enrollment_request( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1459,19 +1456,13 @@ def list_enrollment_requests( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EnrollmentRequestList: - """list_enrollment_requests + ) -> EnrollmentRequest: + """get_enrollment_request - List EnrollmentRequest resources. + Get an EnrollmentRequest resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the EnrollmentRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1494,11 +1485,8 @@ def list_enrollment_requests( :return: Returns the result object. """ # noqa: E501 - _param = self._list_enrollment_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_enrollment_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1506,10 +1494,10 @@ def list_enrollment_requests( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequestList", - '400': "Status", + '200': "EnrollmentRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1524,12 +1512,9 @@ def list_enrollment_requests( @validate_call - def list_enrollment_requests_with_http_info( + def get_enrollment_request_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1542,19 +1527,13 @@ def list_enrollment_requests_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EnrollmentRequestList]: - """list_enrollment_requests + ) -> ApiResponse[EnrollmentRequest]: + """get_enrollment_request - List EnrollmentRequest resources. + Get an EnrollmentRequest resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the EnrollmentRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1577,11 +1556,8 @@ def list_enrollment_requests_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_enrollment_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_enrollment_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1589,10 +1565,10 @@ def list_enrollment_requests_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequestList", - '400': "Status", + '200': "EnrollmentRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1607,12 +1583,9 @@ def list_enrollment_requests_with_http_info( @validate_call - def list_enrollment_requests_without_preload_content( + def get_enrollment_request_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1626,18 +1599,12 @@ def list_enrollment_requests_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_enrollment_requests + """get_enrollment_request - List EnrollmentRequest resources. + Get an EnrollmentRequest resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the EnrollmentRequest resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1660,11 +1627,8 @@ def list_enrollment_requests_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_enrollment_requests_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_enrollment_request_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1672,10 +1636,10 @@ def list_enrollment_requests_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequestList", - '400': "Status", + '200': "EnrollmentRequest", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1685,12 +1649,9 @@ def list_enrollment_requests_without_preload_content( return response_data.response - def _list_enrollment_requests_serialize( + def _get_enrollment_request_serialize( self, - var_continue, - label_selector, - field_selector, - limit, + name, _request_auth, _content_type, _headers, @@ -1712,23 +1673,9 @@ def _list_enrollment_requests_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -1749,7 +1696,7 @@ def _list_enrollment_requests_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/enrollmentrequests', + resource_path='/api/v1/enrollmentrequests/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1766,10 +1713,9 @@ def _list_enrollment_requests_serialize( @validate_call - def patch_enrollment_request( + def get_enrollment_request_status( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1783,14 +1729,12 @@ def patch_enrollment_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EnrollmentRequest: - """patch_enrollment_request + """get_enrollment_request_status - Patch an EnrollmentRequest resource. + Get the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to patch. (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1813,9 +1757,8 @@ def patch_enrollment_request( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_serialize( + _param = self._get_enrollment_request_status_serialize( name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1824,11 +1767,9 @@ def patch_enrollment_request( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", - '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1843,10 +1784,9 @@ def patch_enrollment_request( @validate_call - def patch_enrollment_request_with_http_info( + def get_enrollment_request_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1860,14 +1800,12 @@ def patch_enrollment_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EnrollmentRequest]: - """patch_enrollment_request + """get_enrollment_request_status - Patch an EnrollmentRequest resource. + Get the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to patch. (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1890,9 +1828,8 @@ def patch_enrollment_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_serialize( + _param = self._get_enrollment_request_status_serialize( name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1901,11 +1838,9 @@ def patch_enrollment_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", - '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1920,10 +1855,9 @@ def patch_enrollment_request_with_http_info( @validate_call - def patch_enrollment_request_without_preload_content( + def get_enrollment_request_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1937,14 +1871,12 @@ def patch_enrollment_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_enrollment_request + """get_enrollment_request_status - Patch an EnrollmentRequest resource. + Get the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to patch. (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1967,9 +1899,8 @@ def patch_enrollment_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_serialize( + _param = self._get_enrollment_request_status_serialize( name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1978,11 +1909,9 @@ def patch_enrollment_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", - '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1992,10 +1921,9 @@ def patch_enrollment_request_without_preload_content( return response_data.response - def _patch_enrollment_request_serialize( + def _get_enrollment_request_status_serialize( self, name, - patch_request_inner, _request_auth, _content_type, _headers, @@ -2005,7 +1933,6 @@ def _patch_enrollment_request_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2024,8 +1951,6 @@ def _patch_enrollment_request_serialize( # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2036,27 +1961,14 @@ def _patch_enrollment_request_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/enrollmentrequests/{name}', + method='GET', + resource_path='/api/v1/enrollmentrequests/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2073,10 +1985,12 @@ def _patch_enrollment_request_serialize( @validate_call - def patch_enrollment_request_status( + def list_enrollment_requests( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2089,15 +2003,19 @@ def patch_enrollment_request_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EnrollmentRequest: - """patch_enrollment_request_status + ) -> EnrollmentRequestList: + """list_enrollment_requests - Patch the status of an EnrollmentRequest resource. + List EnrollmentRequest resources. - :param name: The name of the EnrollmentRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2120,9 +2038,11 @@ def patch_enrollment_request_status( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_enrollment_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2130,12 +2050,10 @@ def patch_enrollment_request_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "EnrollmentRequestList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2150,10 +2068,12 @@ def patch_enrollment_request_status( @validate_call - def patch_enrollment_request_status_with_http_info( + def list_enrollment_requests_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2166,15 +2086,19 @@ def patch_enrollment_request_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EnrollmentRequest]: - """patch_enrollment_request_status + ) -> ApiResponse[EnrollmentRequestList]: + """list_enrollment_requests - Patch the status of an EnrollmentRequest resource. + List EnrollmentRequest resources. - :param name: The name of the EnrollmentRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2197,9 +2121,11 @@ def patch_enrollment_request_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_enrollment_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2207,12 +2133,10 @@ def patch_enrollment_request_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "EnrollmentRequestList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2227,10 +2151,12 @@ def patch_enrollment_request_status_with_http_info( @validate_call - def patch_enrollment_request_status_without_preload_content( + def list_enrollment_requests_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2244,14 +2170,18 @@ def patch_enrollment_request_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_enrollment_request_status + """list_enrollment_requests - Patch the status of an EnrollmentRequest resource. + List EnrollmentRequest resources. - :param name: The name of the EnrollmentRequest resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2274,9 +2204,11 @@ def patch_enrollment_request_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_enrollment_request_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_enrollment_requests_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2284,12 +2216,10 @@ def patch_enrollment_request_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EnrollmentRequest", + '200': "EnrollmentRequestList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2299,10 +2229,12 @@ def patch_enrollment_request_status_without_preload_content( return response_data.response - def _patch_enrollment_request_status_serialize( + def _list_enrollment_requests_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, _request_auth, _content_type, _headers, @@ -2312,7 +2244,6 @@ def _patch_enrollment_request_status_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2325,14 +2256,26 @@ def _patch_enrollment_request_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2343,27 +2286,14 @@ def _patch_enrollment_request_status_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/enrollmentrequests/{name}/status', + method='GET', + resource_path='/api/v1/enrollmentrequests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2380,9 +2310,10 @@ def _patch_enrollment_request_status_serialize( @validate_call - def read_enrollment_request( + def patch_enrollment_request( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2396,12 +2327,14 @@ def read_enrollment_request( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EnrollmentRequest: - """read_enrollment_request + """patch_enrollment_request - Get an EnrollmentRequest resource. + Patch an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2424,8 +2357,9 @@ def read_enrollment_request( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_serialize( + _param = self._patch_enrollment_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2434,9 +2368,11 @@ def read_enrollment_request( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2451,9 +2387,10 @@ def read_enrollment_request( @validate_call - def read_enrollment_request_with_http_info( + def patch_enrollment_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2467,12 +2404,14 @@ def read_enrollment_request_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EnrollmentRequest]: - """read_enrollment_request + """patch_enrollment_request - Get an EnrollmentRequest resource. + Patch an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2495,8 +2434,9 @@ def read_enrollment_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_serialize( + _param = self._patch_enrollment_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2505,9 +2445,11 @@ def read_enrollment_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2522,9 +2464,10 @@ def read_enrollment_request_with_http_info( @validate_call - def read_enrollment_request_without_preload_content( + def patch_enrollment_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2538,12 +2481,14 @@ def read_enrollment_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_enrollment_request + """patch_enrollment_request - Get an EnrollmentRequest resource. + Patch an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2566,8 +2511,9 @@ def read_enrollment_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_serialize( + _param = self._patch_enrollment_request_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2576,9 +2522,11 @@ def read_enrollment_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2588,9 +2536,10 @@ def read_enrollment_request_without_preload_content( return response_data.response - def _read_enrollment_request_serialize( + def _patch_enrollment_request_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -2600,6 +2549,7 @@ def _read_enrollment_request_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2618,6 +2568,8 @@ def _read_enrollment_request_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2628,13 +2580,26 @@ def _read_enrollment_request_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/enrollmentrequests/{name}', path_params=_path_params, query_params=_query_params, @@ -2652,9 +2617,10 @@ def _read_enrollment_request_serialize( @validate_call - def read_enrollment_request_status( + def patch_enrollment_request_status( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2668,12 +2634,14 @@ def read_enrollment_request_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> EnrollmentRequest: - """read_enrollment_request_status + """patch_enrollment_request_status - Get the status of an EnrollmentRequest resource. + Patch the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2696,8 +2664,9 @@ def read_enrollment_request_status( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_status_serialize( + _param = self._patch_enrollment_request_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2706,9 +2675,11 @@ def read_enrollment_request_status( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2723,9 +2694,10 @@ def read_enrollment_request_status( @validate_call - def read_enrollment_request_status_with_http_info( + def patch_enrollment_request_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2739,12 +2711,14 @@ def read_enrollment_request_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[EnrollmentRequest]: - """read_enrollment_request_status + """patch_enrollment_request_status - Get the status of an EnrollmentRequest resource. + Patch the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2767,8 +2741,9 @@ def read_enrollment_request_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_status_serialize( + _param = self._patch_enrollment_request_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2777,9 +2752,11 @@ def read_enrollment_request_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2794,9 +2771,10 @@ def read_enrollment_request_status_with_http_info( @validate_call - def read_enrollment_request_status_without_preload_content( + def patch_enrollment_request_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2810,12 +2788,14 @@ def read_enrollment_request_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_enrollment_request_status + """patch_enrollment_request_status - Get the status of an EnrollmentRequest resource. + Patch the status of an EnrollmentRequest resource. - :param name: The name of the EnrollmentRequest resource to get. (required) + :param name: The name of the EnrollmentRequest resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2838,8 +2818,9 @@ def read_enrollment_request_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_enrollment_request_status_serialize( + _param = self._patch_enrollment_request_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2848,9 +2829,11 @@ def read_enrollment_request_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2860,9 +2843,10 @@ def read_enrollment_request_status_without_preload_content( return response_data.response - def _read_enrollment_request_status_serialize( + def _patch_enrollment_request_status_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -2872,6 +2856,7 @@ def _read_enrollment_request_status_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2890,6 +2875,8 @@ def _read_enrollment_request_status_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2900,13 +2887,26 @@ def _read_enrollment_request_status_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/enrollmentrequests/{name}/status', path_params=_path_params, query_params=_query_params, diff --git a/flightctl/api/fleet_api.py b/flightctl/api/fleet_api.py index e392c90..2653432 100644 --- a/flightctl/api/fleet_api.py +++ b/flightctl/api/fleet_api.py @@ -349,7 +349,7 @@ def delete_fleet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Fleet: + ) -> Status: """delete_fleet Delete a Fleet resource. @@ -387,7 +387,7 @@ def delete_fleet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -420,7 +420,7 @@ def delete_fleet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Fleet]: + ) -> ApiResponse[Status]: """delete_fleet Delete a Fleet resource. @@ -458,7 +458,7 @@ def delete_fleet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -529,7 +529,7 @@ def delete_fleet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -876,7 +876,7 @@ def delete_template_version( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TemplateVersion: + ) -> Status: """delete_template_version delete a template version @@ -917,7 +917,7 @@ def delete_template_version( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -951,7 +951,7 @@ def delete_template_version_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TemplateVersion]: + ) -> ApiResponse[Status]: """delete_template_version delete a template version @@ -992,7 +992,7 @@ def delete_template_version_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -1067,7 +1067,7 @@ def delete_template_version_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -1416,12 +1416,9 @@ def _delete_template_versions_serialize( @validate_call - def list_fleets( + def get_fleet( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, @@ -1435,19 +1432,13 @@ def list_fleets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FleetList: - """list_fleets + ) -> Fleet: + """get_fleet - List Fleet resources. + Get a Fleet resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param add_devices_summary: Include a summary of the devices in the fleet. :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one @@ -1472,11 +1463,8 @@ def list_fleets( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_serialize( + name=name, add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, @@ -1485,10 +1473,10 @@ def list_fleets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1503,12 +1491,9 @@ def list_fleets( @validate_call - def list_fleets_with_http_info( + def get_fleet_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, @@ -1522,19 +1507,13 @@ def list_fleets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FleetList]: - """list_fleets + ) -> ApiResponse[Fleet]: + """get_fleet - List Fleet resources. + Get a Fleet resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param add_devices_summary: Include a summary of the devices in the fleet. :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one @@ -1559,11 +1538,8 @@ def list_fleets_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_serialize( + name=name, add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, @@ -1572,10 +1548,10 @@ def list_fleets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1590,12 +1566,9 @@ def list_fleets_with_http_info( @validate_call - def list_fleets_without_preload_content( + def get_fleet_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, @@ -1610,18 +1583,12 @@ def list_fleets_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_fleets + """get_fleet - List Fleet resources. + Get a Fleet resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param add_devices_summary: Include a summary of the devices in the fleet. :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one @@ -1646,11 +1613,8 @@ def list_fleets_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_serialize( + name=name, add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, @@ -1659,10 +1623,10 @@ def list_fleets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1672,12 +1636,9 @@ def list_fleets_without_preload_content( return response_data.response - def _list_fleets_serialize( + def _get_fleet_serialize( self, - var_continue, - label_selector, - field_selector, - limit, + name, add_devices_summary, _request_auth, _content_type, @@ -1700,23 +1661,9 @@ def _list_fleets_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - if add_devices_summary is not None: _query_params.append(('addDevicesSummary', add_devices_summary)) @@ -1741,7 +1688,7 @@ def _list_fleets_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/fleets', + resource_path='/api/v1/fleets/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1758,13 +1705,9 @@ def _list_fleets_serialize( @validate_call - def list_template_versions( + def get_fleet_status( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1777,21 +1720,13 @@ def list_template_versions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TemplateVersionList: - """list_template_versions + ) -> Fleet: + """get_fleet_status - list template versions + read status of the specified Fleet - :param fleet: The owner of the template versions. (required) - :type fleet: str - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1814,12 +1749,8 @@ def list_template_versions( :return: Returns the result object. """ # noqa: E501 - _param = self._list_template_versions_serialize( - fleet=fleet, - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1827,10 +1758,10 @@ def list_template_versions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersionList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1845,13 +1776,9 @@ def list_template_versions( @validate_call - def list_template_versions_with_http_info( + def get_fleet_status_with_http_info( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1864,21 +1791,13 @@ def list_template_versions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TemplateVersionList]: - """list_template_versions + ) -> ApiResponse[Fleet]: + """get_fleet_status - list template versions + read status of the specified Fleet - :param fleet: The owner of the template versions. (required) - :type fleet: str - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1901,12 +1820,8 @@ def list_template_versions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_template_versions_serialize( - fleet=fleet, - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1914,10 +1829,10 @@ def list_template_versions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersionList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1932,13 +1847,9 @@ def list_template_versions_with_http_info( @validate_call - def list_template_versions_without_preload_content( + def get_fleet_status_without_preload_content( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1952,20 +1863,12 @@ def list_template_versions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_template_versions + """get_fleet_status - list template versions + read status of the specified Fleet - :param fleet: The owner of the template versions. (required) - :type fleet: str - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Fleet resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1988,12 +1891,8 @@ def list_template_versions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_template_versions_serialize( - fleet=fleet, - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_fleet_status_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2001,10 +1900,10 @@ def list_template_versions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersionList", - '400': "Status", + '200': "Fleet", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2014,13 +1913,9 @@ def list_template_versions_without_preload_content( return response_data.response - def _list_template_versions_serialize( + def _get_fleet_status_serialize( self, - fleet, - var_continue, - label_selector, - field_selector, - limit, + name, _request_auth, _content_type, _headers, @@ -2042,25 +1937,9 @@ def _list_template_versions_serialize( _body_params: Optional[bytes] = None # process the path parameters - if fleet is not None: - _path_params['fleet'] = fleet + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -2081,7 +1960,7 @@ def _list_template_versions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/fleets/{fleet}/templateversions', + resource_path='/api/v1/fleets/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2098,10 +1977,10 @@ def _list_template_versions_serialize( @validate_call - def patch_fleet( + def get_template_version( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2114,15 +1993,15 @@ def patch_fleet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Fleet: - """patch_fleet + ) -> TemplateVersion: + """get_template_version - Patch a Fleet resource. + read the specified template version - :param name: The name of the Fleet resource to patch. (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2145,9 +2024,9 @@ def patch_fleet( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._get_template_version_serialize( + fleet=fleet, name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2155,12 +2034,10 @@ def patch_fleet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", - '400': "Status", + '200': "TemplateVersion", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2175,10 +2052,10 @@ def patch_fleet( @validate_call - def patch_fleet_with_http_info( + def get_template_version_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2191,15 +2068,15 @@ def patch_fleet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Fleet]: - """patch_fleet + ) -> ApiResponse[TemplateVersion]: + """get_template_version - Patch a Fleet resource. + read the specified template version - :param name: The name of the Fleet resource to patch. (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2222,9 +2099,9 @@ def patch_fleet_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._get_template_version_serialize( + fleet=fleet, name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2232,12 +2109,10 @@ def patch_fleet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", - '400': "Status", + '200': "TemplateVersion", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2252,10 +2127,10 @@ def patch_fleet_with_http_info( @validate_call - def patch_fleet_without_preload_content( + def get_template_version_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2269,14 +2144,14 @@ def patch_fleet_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_fleet + """get_template_version - Patch a Fleet resource. + read the specified template version - :param name: The name of the Fleet resource to patch. (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2299,9 +2174,9 @@ def patch_fleet_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._get_template_version_serialize( + fleet=fleet, name=name, - patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2309,12 +2184,10 @@ def patch_fleet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", - '400': "Status", + '200': "TemplateVersion", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2324,10 +2197,10 @@ def patch_fleet_without_preload_content( return response_data.response - def _patch_fleet_serialize( + def _get_template_version_serialize( self, + fleet, name, - patch_request_inner, _request_auth, _content_type, _headers, @@ -2337,7 +2210,6 @@ def _patch_fleet_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2350,14 +2222,14 @@ def _patch_fleet_serialize( _body_params: Optional[bytes] = None # process the path parameters + if fleet is not None: + _path_params['fleet'] = fleet if name is not None: _path_params['name'] = name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2368,27 +2240,14 @@ def _patch_fleet_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/fleets/{name}', + method='GET', + resource_path='/api/v1/fleets/{fleet}/templateversions/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2405,10 +2264,13 @@ def _patch_fleet_serialize( @validate_call - def patch_fleet_status( + def list_fleets( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2421,15 +2283,21 @@ def patch_fleet_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Fleet: - """patch_fleet_status + ) -> FleetList: + """list_fleets - Patch the status of a Fleet resource. + List Fleet resources. - :param name: The name of the Fleet resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2452,9 +2320,12 @@ def patch_fleet_status( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2462,11 +2333,10 @@ def patch_fleet_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "FleetList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2481,10 +2351,13 @@ def patch_fleet_status( @validate_call - def patch_fleet_status_with_http_info( + def list_fleets_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2497,15 +2370,21 @@ def patch_fleet_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Fleet]: - """patch_fleet_status + ) -> ApiResponse[FleetList]: + """list_fleets - Patch the status of a Fleet resource. + List Fleet resources. - :param name: The name of the Fleet resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2528,9 +2407,12 @@ def patch_fleet_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2538,11 +2420,10 @@ def patch_fleet_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "FleetList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2557,10 +2438,13 @@ def patch_fleet_status_with_http_info( @validate_call - def patch_fleet_status_without_preload_content( + def list_fleets_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2574,14 +2458,20 @@ def patch_fleet_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_fleet_status + """list_fleets - Patch the status of a Fleet resource. + List Fleet resources. - :param name: The name of the Fleet resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2604,9 +2494,12 @@ def patch_fleet_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_status_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2614,11 +2507,10 @@ def patch_fleet_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "FleetList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2628,10 +2520,13 @@ def patch_fleet_status_without_preload_content( return response_data.response - def _patch_fleet_status_serialize( + def _list_fleets_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, + add_devices_summary, _request_auth, _content_type, _headers, @@ -2641,7 +2536,6 @@ def _patch_fleet_status_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -2654,14 +2548,30 @@ def _patch_fleet_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if add_devices_summary is not None: + + _query_params.append(('addDevicesSummary', add_devices_summary)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -2672,27 +2582,14 @@ def _patch_fleet_status_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/fleets/{name}/status', + method='GET', + resource_path='/api/v1/fleets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2709,10 +2606,13 @@ def _patch_fleet_status_serialize( @validate_call - def read_fleet( + def list_template_versions( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2725,15 +2625,21 @@ def read_fleet( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Fleet: - """read_fleet + ) -> TemplateVersionList: + """list_template_versions - Get a Fleet resource. + list template versions - :param name: The name of the Fleet resource to get. (required) - :type name: str - :param add_devices_summary: Include a summary of the devices in the fleet. - :type add_devices_summary: bool + :param fleet: The owner of the template versions. (required) + :type fleet: str + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2756,9 +2662,12 @@ def read_fleet( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( - name=name, - add_devices_summary=add_devices_summary, + _param = self._list_template_versions_serialize( + fleet=fleet, + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2766,10 +2675,10 @@ def read_fleet( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersionList", + '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2784,10 +2693,13 @@ def read_fleet( @validate_call - def read_fleet_with_http_info( + def list_template_versions_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2800,15 +2712,21 @@ def read_fleet_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Fleet]: - """read_fleet + ) -> ApiResponse[TemplateVersionList]: + """list_template_versions - Get a Fleet resource. + list template versions - :param name: The name of the Fleet resource to get. (required) - :type name: str - :param add_devices_summary: Include a summary of the devices in the fleet. - :type add_devices_summary: bool + :param fleet: The owner of the template versions. (required) + :type fleet: str + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2831,9 +2749,12 @@ def read_fleet_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( - name=name, - add_devices_summary=add_devices_summary, + _param = self._list_template_versions_serialize( + fleet=fleet, + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2841,10 +2762,10 @@ def read_fleet_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersionList", + '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2859,10 +2780,13 @@ def read_fleet_with_http_info( @validate_call - def read_fleet_without_preload_content( + def list_template_versions_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2876,14 +2800,20 @@ def read_fleet_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_fleet + """list_template_versions - Get a Fleet resource. + list template versions - :param name: The name of the Fleet resource to get. (required) - :type name: str - :param add_devices_summary: Include a summary of the devices in the fleet. - :type add_devices_summary: bool + :param fleet: The owner of the template versions. (required) + :type fleet: str + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2906,9 +2836,12 @@ def read_fleet_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( - name=name, - add_devices_summary=add_devices_summary, + _param = self._list_template_versions_serialize( + fleet=fleet, + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2916,10 +2849,10 @@ def read_fleet_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersionList", + '400': "Status", '401': "Status", '403': "Status", - '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -2929,10 +2862,13 @@ def read_fleet_without_preload_content( return response_data.response - def _read_fleet_serialize( + def _list_template_versions_serialize( self, - name, - add_devices_summary, + fleet, + var_continue, + label_selector, + field_selector, + limit, _request_auth, _content_type, _headers, @@ -2954,12 +2890,24 @@ def _read_fleet_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name + if fleet is not None: + _path_params['fleet'] = fleet # process the query parameters - if add_devices_summary is not None: + if var_continue is not None: - _query_params.append(('addDevicesSummary', add_devices_summary)) + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) # process the header parameters # process the form parameters @@ -2981,7 +2929,7 @@ def _read_fleet_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/fleets/{name}', + resource_path='/api/v1/fleets/{fleet}/templateversions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2998,9 +2946,10 @@ def _read_fleet_serialize( @validate_call - def read_fleet_status( + def patch_fleet( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3014,12 +2963,14 @@ def read_fleet_status( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Fleet: - """read_fleet_status + """patch_fleet - read status of the specified Fleet + Patch a Fleet resource. - :param name: The name of the Fleet resource to get. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3042,8 +2993,9 @@ def read_fleet_status( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._patch_fleet_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3052,9 +3004,11 @@ def read_fleet_status( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -3069,9 +3023,10 @@ def read_fleet_status( @validate_call - def read_fleet_status_with_http_info( + def patch_fleet_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3085,12 +3040,14 @@ def read_fleet_status_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Fleet]: - """read_fleet_status + """patch_fleet - read status of the specified Fleet + Patch a Fleet resource. - :param name: The name of the Fleet resource to get. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3113,8 +3070,9 @@ def read_fleet_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._patch_fleet_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3123,9 +3081,11 @@ def read_fleet_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -3140,9 +3100,10 @@ def read_fleet_status_with_http_info( @validate_call - def read_fleet_status_without_preload_content( + def patch_fleet_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3156,12 +3117,14 @@ def read_fleet_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_fleet_status + """patch_fleet - read status of the specified Fleet + Patch a Fleet resource. - :param name: The name of the Fleet resource to get. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3184,8 +3147,9 @@ def read_fleet_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._patch_fleet_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3194,9 +3158,11 @@ def read_fleet_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -3206,9 +3172,10 @@ def read_fleet_status_without_preload_content( return response_data.response - def _read_fleet_status_serialize( + def _patch_fleet_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -3218,6 +3185,7 @@ def _read_fleet_status_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -3236,6 +3204,8 @@ def _read_fleet_status_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -3246,14 +3216,27 @@ def _read_fleet_status_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/fleets/{name}/status', + method='PATCH', + resource_path='/api/v1/fleets/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3270,10 +3253,10 @@ def _read_fleet_status_serialize( @validate_call - def read_template_version( + def patch_fleet_status( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], - name: Annotated[StrictStr, Field(description="The name of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3286,15 +3269,15 @@ def read_template_version( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TemplateVersion: - """read_template_version + ) -> Fleet: + """patch_fleet_status - read the specified template version + Patch the status of a Fleet resource. - :param fleet: The owner of the template version. (required) - :type fleet: str - :param name: The name of the template version. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3317,9 +3300,9 @@ def read_template_version( :return: Returns the result object. """ # noqa: E501 - _param = self._read_template_version_serialize( - fleet=fleet, + _param = self._patch_fleet_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3327,7 +3310,8 @@ def read_template_version( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -3345,10 +3329,10 @@ def read_template_version( @validate_call - def read_template_version_with_http_info( + def patch_fleet_status_with_http_info( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], - name: Annotated[StrictStr, Field(description="The name of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3361,15 +3345,15 @@ def read_template_version_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TemplateVersion]: - """read_template_version + ) -> ApiResponse[Fleet]: + """patch_fleet_status - read the specified template version + Patch the status of a Fleet resource. - :param fleet: The owner of the template version. (required) - :type fleet: str - :param name: The name of the template version. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3392,9 +3376,9 @@ def read_template_version_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_template_version_serialize( - fleet=fleet, + _param = self._patch_fleet_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3402,7 +3386,8 @@ def read_template_version_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -3420,10 +3405,10 @@ def read_template_version_with_http_info( @validate_call - def read_template_version_without_preload_content( + def patch_fleet_status_without_preload_content( self, - fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], - name: Annotated[StrictStr, Field(description="The name of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3437,14 +3422,14 @@ def read_template_version_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_template_version + """patch_fleet_status - read the specified template version + Patch the status of a Fleet resource. - :param fleet: The owner of the template version. (required) - :type fleet: str - :param name: The name of the template version. (required) + :param name: The name of the Fleet resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3467,9 +3452,9 @@ def read_template_version_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_template_version_serialize( - fleet=fleet, + _param = self._patch_fleet_status_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3477,7 +3462,8 @@ def read_template_version_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateVersion", + '200': "Fleet", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -3490,10 +3476,10 @@ def read_template_version_without_preload_content( return response_data.response - def _read_template_version_serialize( + def _patch_fleet_status_serialize( self, - fleet, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -3503,6 +3489,7 @@ def _read_template_version_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -3515,14 +3502,14 @@ def _read_template_version_serialize( _body_params: Optional[bytes] = None # process the path parameters - if fleet is not None: - _path_params['fleet'] = fleet if name is not None: _path_params['name'] = name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -3533,14 +3520,27 @@ def _read_template_version_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/fleets/{fleet}/templateversions/{name}', + method='PATCH', + resource_path='/api/v1/fleets/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/flightctl/api/labels_api.py b/flightctl/api/labels_api.py new file mode 100644 index 0000000..0392312 --- /dev/null +++ b/flightctl/api/labels_api.py @@ -0,0 +1,364 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated + +from flightctl.api_client import ApiClient, RequestSerialized +from flightctl.api_response import ApiResponse +from flightctl.rest import RESTResponseType + + +class LabelsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def list_labels( + self, + kind: Annotated[StrictStr, Field(description="The type of resource to retrieve labels from.")], + label_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given label selector.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given field selector.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of distinct labels to return in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[str]: + """list_labels + + Retrieves a distinct list of labels for the specified resource type. + + :param kind: The type of resource to retrieve labels from. (required) + :type kind: str + :param label_selector: A filter to retrieve labels only from resources that match the given label selector. + :type label_selector: str + :param field_selector: A filter to retrieve labels only from resources that match the given field selector. + :type field_selector: str + :param limit: The maximum number of distinct labels to return in the response. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_labels_serialize( + kind=kind, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "Status", + '401': "Status", + '403': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_labels_with_http_info( + self, + kind: Annotated[StrictStr, Field(description="The type of resource to retrieve labels from.")], + label_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given label selector.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given field selector.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of distinct labels to return in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[str]]: + """list_labels + + Retrieves a distinct list of labels for the specified resource type. + + :param kind: The type of resource to retrieve labels from. (required) + :type kind: str + :param label_selector: A filter to retrieve labels only from resources that match the given label selector. + :type label_selector: str + :param field_selector: A filter to retrieve labels only from resources that match the given field selector. + :type field_selector: str + :param limit: The maximum number of distinct labels to return in the response. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_labels_serialize( + kind=kind, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "Status", + '401': "Status", + '403': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_labels_without_preload_content( + self, + kind: Annotated[StrictStr, Field(description="The type of resource to retrieve labels from.")], + label_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given label selector.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A filter to retrieve labels only from resources that match the given field selector.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of distinct labels to return in the response.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_labels + + Retrieves a distinct list of labels for the specified resource type. + + :param kind: The type of resource to retrieve labels from. (required) + :type kind: str + :param label_selector: A filter to retrieve labels only from resources that match the given label selector. + :type label_selector: str + :param field_selector: A filter to retrieve labels only from resources that match the given field selector. + :type field_selector: str + :param limit: The maximum number of distinct labels to return in the response. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_labels_serialize( + kind=kind, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[str]", + '400': "Status", + '401': "Status", + '403': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_labels_serialize( + self, + kind, + label_selector, + field_selector, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if kind is not None: + + _query_params.append(('kind', kind)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/labels', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flightctl/api/repository_api.py b/flightctl/api/repository_api.py index 701906f..cc86a2a 100644 --- a/flightctl/api/repository_api.py +++ b/flightctl/api/repository_api.py @@ -601,7 +601,7 @@ def delete_repository( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Repository: + ) -> Status: """delete_repository Delete a Repository resource. @@ -639,7 +639,7 @@ def delete_repository( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -672,7 +672,7 @@ def delete_repository_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Repository]: + ) -> ApiResponse[Status]: """delete_repository Delete a Repository resource. @@ -710,7 +710,7 @@ def delete_repository_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -781,7 +781,7 @@ def delete_repository_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -858,12 +858,9 @@ def _delete_repository_serialize( @validate_call - def list_repositories( + def get_repository( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -876,19 +873,13 @@ def list_repositories( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RepositoryList: - """list_repositories + ) -> Repository: + """get_repository - List Repository resources. + Get a Repository resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Repository resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -911,11 +902,8 @@ def list_repositories( :return: Returns the result object. """ # noqa: E501 - _param = self._list_repositories_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_repository_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -923,10 +911,10 @@ def list_repositories( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RepositoryList", - '400': "Status", + '200': "Repository", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -941,12 +929,9 @@ def list_repositories( @validate_call - def list_repositories_with_http_info( + def get_repository_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -959,19 +944,13 @@ def list_repositories_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RepositoryList]: - """list_repositories + ) -> ApiResponse[Repository]: + """get_repository - List Repository resources. + Get a Repository resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Repository resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -994,11 +973,8 @@ def list_repositories_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_repositories_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_repository_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1006,10 +982,10 @@ def list_repositories_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RepositoryList", - '400': "Status", + '200': "Repository", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1024,12 +1000,9 @@ def list_repositories_with_http_info( @validate_call - def list_repositories_without_preload_content( + def get_repository_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1043,18 +1016,12 @@ def list_repositories_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_repositories + """get_repository - List Repository resources. + Get a Repository resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the Repository resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1077,11 +1044,8 @@ def list_repositories_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_repositories_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_repository_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1089,10 +1053,10 @@ def list_repositories_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "RepositoryList", - '400': "Status", + '200': "Repository", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1102,12 +1066,9 @@ def list_repositories_without_preload_content( return response_data.response - def _list_repositories_serialize( + def _get_repository_serialize( self, - var_continue, - label_selector, - field_selector, - limit, + name, _request_auth, _content_type, _headers, @@ -1129,23 +1090,9 @@ def _list_repositories_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -1166,7 +1113,7 @@ def _list_repositories_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/repositories', + resource_path='/api/v1/repositories/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1183,10 +1130,12 @@ def _list_repositories_serialize( @validate_call - def patch_repository( + def list_repositories( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1199,15 +1148,19 @@ def patch_repository( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Repository: - """patch_repository + ) -> RepositoryList: + """list_repositories - Patch a Repository resource. + List Repository resources. - :param name: The name of the Repository resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1230,9 +1183,11 @@ def patch_repository( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_repository_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_repositories_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1240,12 +1195,10 @@ def patch_repository( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "RepositoryList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1260,10 +1213,12 @@ def patch_repository( @validate_call - def patch_repository_with_http_info( + def list_repositories_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1276,15 +1231,19 @@ def patch_repository_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Repository]: - """patch_repository + ) -> ApiResponse[RepositoryList]: + """list_repositories - Patch a Repository resource. + List Repository resources. - :param name: The name of the Repository resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1307,9 +1266,11 @@ def patch_repository_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_repository_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_repositories_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1317,12 +1278,10 @@ def patch_repository_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "RepositoryList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1337,10 +1296,12 @@ def patch_repository_with_http_info( @validate_call - def patch_repository_without_preload_content( + def list_repositories_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1354,14 +1315,18 @@ def patch_repository_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_repository + """list_repositories - Patch a Repository resource. + List Repository resources. - :param name: The name of the Repository resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1384,9 +1349,11 @@ def patch_repository_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_repository_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_repositories_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1394,12 +1361,10 @@ def patch_repository_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Repository", + '200': "RepositoryList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1409,10 +1374,12 @@ def patch_repository_without_preload_content( return response_data.response - def _patch_repository_serialize( + def _list_repositories_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, _request_auth, _content_type, _headers, @@ -1422,7 +1389,6 @@ def _patch_repository_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1435,14 +1401,26 @@ def _patch_repository_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1453,27 +1431,14 @@ def _patch_repository_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/repositories/{name}', + method='GET', + resource_path='/api/v1/repositories', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1490,9 +1455,10 @@ def _patch_repository_serialize( @validate_call - def read_repository( + def patch_repository( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1506,12 +1472,14 @@ def read_repository( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Repository: - """read_repository + """patch_repository - Get a Repository resource. + Patch a Repository resource. - :param name: The name of the Repository resource to get. (required) + :param name: The name of the Repository resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1534,8 +1502,9 @@ def read_repository( :return: Returns the result object. """ # noqa: E501 - _param = self._read_repository_serialize( + _param = self._patch_repository_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1544,9 +1513,11 @@ def read_repository( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1561,9 +1532,10 @@ def read_repository( @validate_call - def read_repository_with_http_info( + def patch_repository_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1577,12 +1549,14 @@ def read_repository_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Repository]: - """read_repository + """patch_repository - Get a Repository resource. + Patch a Repository resource. - :param name: The name of the Repository resource to get. (required) + :param name: The name of the Repository resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1605,8 +1579,9 @@ def read_repository_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_repository_serialize( + _param = self._patch_repository_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1615,9 +1590,11 @@ def read_repository_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1632,9 +1609,10 @@ def read_repository_with_http_info( @validate_call - def read_repository_without_preload_content( + def patch_repository_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1648,12 +1626,14 @@ def read_repository_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_repository + """patch_repository - Get a Repository resource. + Patch a Repository resource. - :param name: The name of the Repository resource to get. (required) + :param name: The name of the Repository resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1676,8 +1656,9 @@ def read_repository_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_repository_serialize( + _param = self._patch_repository_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1686,9 +1667,11 @@ def read_repository_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1698,9 +1681,10 @@ def read_repository_without_preload_content( return response_data.response - def _read_repository_serialize( + def _patch_repository_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -1710,6 +1694,7 @@ def _read_repository_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1728,6 +1713,8 @@ def _read_repository_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1738,13 +1725,26 @@ def _read_repository_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/repositories/{name}', path_params=_path_params, query_params=_query_params, diff --git a/flightctl/api/resourcesync_api.py b/flightctl/api/resourcesync_api.py index 3dedf7d..4a0df4b 100644 --- a/flightctl/api/resourcesync_api.py +++ b/flightctl/api/resourcesync_api.py @@ -347,7 +347,7 @@ def delete_resource_sync( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceSync: + ) -> Status: """delete_resource_sync Delete a ResourceSync resource. @@ -385,7 +385,7 @@ def delete_resource_sync( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -418,7 +418,7 @@ def delete_resource_sync_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceSync]: + ) -> ApiResponse[Status]: """delete_resource_sync Delete a ResourceSync resource. @@ -456,7 +456,7 @@ def delete_resource_sync_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -527,7 +527,7 @@ def delete_resource_sync_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "Status", '401': "Status", '403': "Status", '404': "Status", @@ -858,12 +858,9 @@ def _delete_resource_syncs_serialize( @validate_call - def list_resource_sync( + def get_resource_sync( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -876,19 +873,13 @@ def list_resource_sync( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceSyncList: - """list_resource_sync + ) -> ResourceSync: + """get_resource_sync - List ResourceSync resources. + Get a ResourceSync resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the ResourceSync resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -911,11 +902,8 @@ def list_resource_sync( :return: Returns the result object. """ # noqa: E501 - _param = self._list_resource_sync_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_resource_sync_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -923,10 +911,10 @@ def list_resource_sync( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSyncList", - '400': "Status", + '200': "ResourceSync", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -941,12 +929,9 @@ def list_resource_sync( @validate_call - def list_resource_sync_with_http_info( + def get_resource_sync_with_http_info( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -959,19 +944,13 @@ def list_resource_sync_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceSyncList]: - """list_resource_sync + ) -> ApiResponse[ResourceSync]: + """get_resource_sync - List ResourceSync resources. + Get a ResourceSync resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the ResourceSync resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -994,11 +973,8 @@ def list_resource_sync_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_resource_sync_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_resource_sync_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1006,10 +982,10 @@ def list_resource_sync_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSyncList", - '400': "Status", + '200': "ResourceSync", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1024,12 +1000,9 @@ def list_resource_sync_with_http_info( @validate_call - def list_resource_sync_without_preload_content( + def get_resource_sync_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1043,18 +1016,12 @@ def list_resource_sync_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_resource_sync + """get_resource_sync - List ResourceSync resources. + Get a ResourceSync resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int + :param name: The name of the ResourceSync resource to get. (required) + :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1077,11 +1044,8 @@ def list_resource_sync_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_resource_sync_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, + _param = self._get_resource_sync_serialize( + name=name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1089,10 +1053,10 @@ def list_resource_sync_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSyncList", - '400': "Status", + '200': "ResourceSync", '401': "Status", '403': "Status", + '404': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1102,12 +1066,9 @@ def list_resource_sync_without_preload_content( return response_data.response - def _list_resource_sync_serialize( + def _get_resource_sync_serialize( self, - var_continue, - label_selector, - field_selector, - limit, + name, _request_auth, _content_type, _headers, @@ -1129,23 +1090,9 @@ def _list_resource_sync_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter @@ -1166,7 +1113,7 @@ def _list_resource_sync_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/resourcesyncs', + resource_path='/api/v1/resourcesyncs/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1183,10 +1130,12 @@ def _list_resource_sync_serialize( @validate_call - def patch_resource_sync( + def list_resource_syncs( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1199,15 +1148,19 @@ def patch_resource_sync( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResourceSync: - """patch_resource_sync + ) -> ResourceSyncList: + """list_resource_syncs - Patch a ResourceSync resource. + List ResourceSync resources. - :param name: The name of the ResourceSync resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1230,9 +1183,11 @@ def patch_resource_sync( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_resource_sync_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_resource_syncs_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1240,12 +1195,10 @@ def patch_resource_sync( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "ResourceSyncList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1260,10 +1213,12 @@ def patch_resource_sync( @validate_call - def patch_resource_sync_with_http_info( + def list_resource_syncs_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1276,15 +1231,19 @@ def patch_resource_sync_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResourceSync]: - """patch_resource_sync + ) -> ApiResponse[ResourceSyncList]: + """list_resource_syncs - Patch a ResourceSync resource. + List ResourceSync resources. - :param name: The name of the ResourceSync resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1307,9 +1266,11 @@ def patch_resource_sync_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_resource_sync_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_resource_syncs_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1317,12 +1278,10 @@ def patch_resource_sync_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "ResourceSyncList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1337,10 +1296,12 @@ def patch_resource_sync_with_http_info( @validate_call - def patch_resource_sync_without_preload_content( + def list_resource_syncs_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], - patch_request_inner: List[PatchRequestInner], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1354,14 +1315,18 @@ def patch_resource_sync_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_resource_sync + """list_resource_syncs - Patch a ResourceSync resource. + List ResourceSync resources. - :param name: The name of the ResourceSync resource to patch. (required) - :type name: str - :param patch_request_inner: (required) - :type patch_request_inner: List[PatchRequestInner] + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1384,9 +1349,11 @@ def patch_resource_sync_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_resource_sync_serialize( - name=name, - patch_request_inner=patch_request_inner, + _param = self._list_resource_syncs_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1394,12 +1361,10 @@ def patch_resource_sync_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ResourceSync", + '200': "ResourceSyncList", '400': "Status", '401': "Status", '403': "Status", - '404': "Status", - '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1409,10 +1374,12 @@ def patch_resource_sync_without_preload_content( return response_data.response - def _patch_resource_sync_serialize( + def _list_resource_syncs_serialize( self, - name, - patch_request_inner, + var_continue, + label_selector, + field_selector, + limit, _request_auth, _content_type, _headers, @@ -1422,7 +1389,6 @@ def _patch_resource_sync_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1435,14 +1401,26 @@ def _patch_resource_sync_serialize( _body_params: Optional[bytes] = None # process the path parameters - if name is not None: - _path_params['name'] = name # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1453,27 +1431,14 @@ def _patch_resource_sync_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/api/v1/resourcesyncs/{name}', + method='GET', + resource_path='/api/v1/resourcesyncs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1490,9 +1455,10 @@ def _patch_resource_sync_serialize( @validate_call - def read_resource_sync( + def patch_resource_sync( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1506,12 +1472,14 @@ def read_resource_sync( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ResourceSync: - """read_resource_sync + """patch_resource_sync - Get a ResourceSync resource. + Patch a ResourceSync resource. - :param name: The name of the ResourceSync resource to get. (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1534,8 +1502,9 @@ def read_resource_sync( :return: Returns the result object. """ # noqa: E501 - _param = self._read_resource_sync_serialize( + _param = self._patch_resource_sync_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1544,9 +1513,11 @@ def read_resource_sync( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1561,9 +1532,10 @@ def read_resource_sync( @validate_call - def read_resource_sync_with_http_info( + def patch_resource_sync_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1577,12 +1549,14 @@ def read_resource_sync_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ResourceSync]: - """read_resource_sync + """patch_resource_sync - Get a ResourceSync resource. + Patch a ResourceSync resource. - :param name: The name of the ResourceSync resource to get. (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1605,8 +1579,9 @@ def read_resource_sync_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_resource_sync_serialize( + _param = self._patch_resource_sync_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1615,9 +1590,11 @@ def read_resource_sync_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1632,9 +1609,10 @@ def read_resource_sync_with_http_info( @validate_call - def read_resource_sync_without_preload_content( + def patch_resource_sync_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], + patch_request_inner: List[PatchRequestInner], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1648,12 +1626,14 @@ def read_resource_sync_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_resource_sync + """patch_resource_sync - Get a ResourceSync resource. + Patch a ResourceSync resource. - :param name: The name of the ResourceSync resource to get. (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1676,8 +1656,9 @@ def read_resource_sync_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_resource_sync_serialize( + _param = self._patch_resource_sync_serialize( name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1686,9 +1667,11 @@ def read_resource_sync_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", + '400': "Status", '401': "Status", '403': "Status", '404': "Status", + '409': "Status", '503': "Status", } response_data = self.api_client.call_api( @@ -1698,9 +1681,10 @@ def read_resource_sync_without_preload_content( return response_data.response - def _read_resource_sync_serialize( + def _patch_resource_sync_serialize( self, name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -1710,6 +1694,7 @@ def _read_resource_sync_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1728,6 +1713,8 @@ def _read_resource_sync_serialize( # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1738,13 +1725,26 @@ def _read_resource_sync_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', + method='PATCH', resource_path='/api/v1/resourcesyncs/{name}', path_params=_path_params, query_params=_query_params, diff --git a/flightctl/models/__init__.py b/flightctl/models/__init__.py index 3f08d0f..1138a81 100644 --- a/flightctl/models/__init__.py +++ b/flightctl/models/__init__.py @@ -15,6 +15,9 @@ # import models into model package +from flightctl.models.absolute_path import AbsolutePath +from flightctl.models.app_type import AppType +from flightctl.models.application_content import ApplicationContent from flightctl.models.application_env_vars import ApplicationEnvVars from flightctl.models.application_provider_spec import ApplicationProviderSpec from flightctl.models.application_status_type import ApplicationStatusType @@ -62,6 +65,7 @@ from flightctl.models.devices_summary import DevicesSummary from flightctl.models.disk_resource_monitor_spec import DiskResourceMonitorSpec from flightctl.models.disruption_budget import DisruptionBudget +from flightctl.models.encoding_type import EncodingType from flightctl.models.enrollment_config import EnrollmentConfig from flightctl.models.enrollment_request import EnrollmentRequest from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval @@ -72,6 +76,8 @@ from flightctl.models.enrollment_service import EnrollmentService from flightctl.models.enrollment_service_auth import EnrollmentServiceAuth from flightctl.models.enrollment_service_service import EnrollmentServiceService +from flightctl.models.file_content import FileContent +from flightctl.models.file_metadata import FileMetadata from flightctl.models.file_operation import FileOperation from flightctl.models.file_spec import FileSpec from flightctl.models.fleet import Fleet @@ -91,7 +97,8 @@ from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef from flightctl.models.http_repo_spec import HttpRepoSpec -from flightctl.models.image_application_provider import ImageApplicationProvider +from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec +from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec from flightctl.models.kubernetes_secret_provider_spec_secret_ref import KubernetesSecretProviderSpecSecretRef @@ -101,6 +108,7 @@ from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec from flightctl.models.object_meta import ObjectMeta from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.relative_path import RelativePath from flightctl.models.repo_spec_type import RepoSpecType from flightctl.models.repository import Repository from flightctl.models.repository_list import RepositoryList diff --git a/flightctl/models/absolute_path.py b/flightctl/models/absolute_path.py new file mode 100644 index 0000000..e3366d0 --- /dev/null +++ b/flightctl/models/absolute_path.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AbsolutePath(BaseModel): + """ + Represents an absolute file path. + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="The absolute path to a file on the system. Note that any existing file will be overwritten.") + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AbsolutePath from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AbsolutePath from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + return _obj + + diff --git a/flightctl/models/app_type.py b/flightctl/models/app_type.py new file mode 100644 index 0000000..bdafba4 --- /dev/null +++ b/flightctl/models/app_type.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AppType(str, Enum): + """ + The type of the application. + """ + + """ + allowed enum values + """ + COMPOSE = 'compose' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AppType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/application_content.py b/flightctl/models/application_content.py new file mode 100644 index 0000000..28eab69 --- /dev/null +++ b/flightctl/models/application_content.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.encoding_type import EncodingType +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationContent(BaseModel): + """ + ApplicationContent + """ # noqa: E501 + content: Optional[StrictStr] = Field(default=None, description="The plain text (UTF-8) or base64-encoded content of the file.") + content_encoding: Optional[EncodingType] = Field(default=None, alias="contentEncoding") + path: StrictStr = Field(description="A relative file path on the system. Note that any existing file will be overwritten.") + __properties: ClassVar[List[str]] = ["content", "contentEncoding", "path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationContent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationContent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "contentEncoding": obj.get("contentEncoding"), + "path": obj.get("path") + }) + return _obj + + diff --git a/flightctl/models/application_provider_spec.py b/flightctl/models/application_provider_spec.py index 1b956a4..e075844 100644 --- a/flightctl/models/application_provider_spec.py +++ b/flightctl/models/application_provider_spec.py @@ -20,6 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.app_type import AppType +from flightctl.models.application_content import ApplicationContent from typing import Optional, Set from typing_extensions import Self @@ -28,9 +30,11 @@ class ApplicationProviderSpec(BaseModel): ApplicationProviderSpec """ # noqa: E501 env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters.", alias="envVars") - name: Optional[StrictStr] = Field(default=None, description="The name of the application must be between 1 and 253 characters and start with a letter or number.") + name: Optional[StrictStr] = Field(default=None, description="The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace.") + app_type: Optional[AppType] = Field(default=None, alias="appType") image: StrictStr = Field(description="Reference to the container image for the application package.") - __properties: ClassVar[List[str]] = ["envVars", "name", "image"] + inline: List[ApplicationContent] = Field(description="A list of application content.") + __properties: ClassVar[List[str]] = ["envVars", "name", "appType", "image", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -71,6 +75,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in inline (list) + _items = [] + if self.inline: + for _item_inline in self.inline: + if _item_inline: + _items.append(_item_inline.to_dict()) + _dict['inline'] = _items return _dict @classmethod @@ -85,7 +96,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "envVars": obj.get("envVars"), "name": obj.get("name"), - "image": obj.get("image") + "appType": obj.get("appType"), + "image": obj.get("image"), + "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None }) return _obj diff --git a/flightctl/models/certificate_signing_request_spec.py b/flightctl/models/certificate_signing_request_spec.py index 0179f76..6ee2c70 100644 --- a/flightctl/models/certificate_signing_request_spec.py +++ b/flightctl/models/certificate_signing_request_spec.py @@ -29,7 +29,7 @@ class CertificateSigningRequestSpec(BaseModel): """ # noqa: E501 expiration_seconds: Optional[StrictInt] = Field(default=None, description="Requested duration of validity for the certificate.", alias="expirationSeconds") extra: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Extra attributes of the user that created the CSR, populated by the API server on creation and immutable.") - request: Optional[Union[StrictBytes, StrictStr]] = Field(description="The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource.") + request: Union[StrictBytes, StrictStr] = Field(description="The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource.") signer_name: StrictStr = Field(description="Indicates the requested signer, and is a qualified name.", alias="signerName") uid: Optional[StrictStr] = Field(default=None, description="UID of the user that created the CSR, populated by the API server on creation and immutable.") usages: Optional[List[StrictStr]] = Field(default=None, description="Usages specifies a set of key usages requested in the issued certificate.") @@ -75,11 +75,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if request (nullable) is None - # and model_fields_set contains the field - if self.request is None and "request" in self.model_fields_set: - _dict['request'] = None - return _dict @classmethod diff --git a/flightctl/models/device_resource_status.py b/flightctl/models/device_resource_status.py index ea1ad97..94fae29 100644 --- a/flightctl/models/device_resource_status.py +++ b/flightctl/models/device_resource_status.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from flightctl.models.device_resource_status_type import DeviceResourceStatusType from typing import Optional, Set @@ -28,10 +28,10 @@ class DeviceResourceStatus(BaseModel): """ Current status of the resources of the device. """ # noqa: E501 - cpu: DeviceResourceStatusType - memory: DeviceResourceStatusType - disk: DeviceResourceStatusType - __properties: ClassVar[List[str]] = ["cpu", "memory", "disk"] + cpu: DeviceResourceStatusType = Field(alias="CPU") + memory: DeviceResourceStatusType = Field(alias="Memory") + disk: DeviceResourceStatusType = Field(alias="Disk") + __properties: ClassVar[List[str]] = ["CPU", "Memory", "Disk"] model_config = ConfigDict( populate_by_name=True, @@ -84,9 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "cpu": obj.get("cpu"), - "memory": obj.get("memory"), - "disk": obj.get("disk") + "CPU": obj.get("CPU"), + "Memory": obj.get("Memory"), + "Disk": obj.get("Disk") }) return _obj diff --git a/flightctl/models/devices_summary.py b/flightctl/models/devices_summary.py index 2a11707..eb5098d 100644 --- a/flightctl/models/devices_summary.py +++ b/flightctl/models/devices_summary.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -28,9 +28,9 @@ class DevicesSummary(BaseModel): A summary of the devices in the fleet returned when fetching a single Fleet. """ # noqa: E501 total: StrictInt = Field(description="The total number of devices in the fleet.") - application_status: Optional[Dict[str, StrictInt]] = Field(description="A breakdown of the devices in the fleet by \"application\" status.", alias="applicationStatus") - summary_status: Optional[Dict[str, StrictInt]] = Field(description="A breakdown of the devices in the fleet by \"summary\" status.", alias="summaryStatus") - update_status: Optional[Dict[str, StrictInt]] = Field(description="A breakdown of the devices in the fleet by \"updated\" status.", alias="updateStatus") + application_status: Dict[str, StrictInt] = Field(description="A breakdown of the devices in the fleet by \"application\" status.", alias="applicationStatus") + summary_status: Dict[str, StrictInt] = Field(description="A breakdown of the devices in the fleet by \"summary\" status.", alias="summaryStatus") + update_status: Dict[str, StrictInt] = Field(description="A breakdown of the devices in the fleet by \"updated\" status.", alias="updateStatus") __properties: ClassVar[List[str]] = ["total", "applicationStatus", "summaryStatus", "updateStatus"] model_config = ConfigDict( @@ -72,21 +72,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if application_status (nullable) is None - # and model_fields_set contains the field - if self.application_status is None and "application_status" in self.model_fields_set: - _dict['applicationStatus'] = None - - # set to None if summary_status (nullable) is None - # and model_fields_set contains the field - if self.summary_status is None and "summary_status" in self.model_fields_set: - _dict['summaryStatus'] = None - - # set to None if update_status (nullable) is None - # and model_fields_set contains the field - if self.update_status is None and "update_status" in self.model_fields_set: - _dict['updateStatus'] = None - return _dict @classmethod diff --git a/flightctl/models/encoding_type.py b/flightctl/models/encoding_type.py new file mode 100644 index 0000000..d8fe351 --- /dev/null +++ b/flightctl/models/encoding_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EncodingType(str, Enum): + """ + Specifies the encoding type used for data representation. + """ + + """ + allowed enum values + """ + PLAIN = 'plain' + BASE64 = 'base64' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EncodingType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/file_content.py b/flightctl/models/file_content.py new file mode 100644 index 0000000..848590c --- /dev/null +++ b/flightctl/models/file_content.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.encoding_type import EncodingType +from typing import Optional, Set +from typing_extensions import Self + +class FileContent(BaseModel): + """ + The content of a file. + """ # noqa: E501 + content: Optional[StrictStr] = Field(default=None, description="The plain text (UTF-8) or base64-encoded content of the file.") + content_encoding: Optional[EncodingType] = Field(default=None, alias="contentEncoding") + __properties: ClassVar[List[str]] = ["content", "contentEncoding"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileContent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileContent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content": obj.get("content"), + "contentEncoding": obj.get("contentEncoding") + }) + return _obj + + diff --git a/flightctl/models/file_metadata.py b/flightctl/models/file_metadata.py new file mode 100644 index 0000000..62893f6 --- /dev/null +++ b/flightctl/models/file_metadata.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FileMetadata(BaseModel): + """ + File metadata. + """ # noqa: E501 + mode: Optional[StrictInt] = Field(default=None, description="The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644.") + user: Optional[StrictStr] = Field(default=None, description="The file's owner, specified either as a name or numeric ID. Defaults to \"root\".") + group: Optional[StrictStr] = Field(default=None, description="The file's group, specified either as a name or numeric ID. Defaults to \"root\".") + __properties: ClassVar[List[str]] = ["mode", "user", "group"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FileMetadata from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FileMetadata from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mode": obj.get("mode"), + "user": obj.get("user"), + "group": obj.get("group") + }) + return _obj + + diff --git a/flightctl/models/file_spec.py b/flightctl/models/file_spec.py index 05ac61c..61827e0 100644 --- a/flightctl/models/file_spec.py +++ b/flightctl/models/file_spec.py @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.encoding_type import EncodingType from typing import Optional, Set from typing_extensions import Self @@ -27,23 +28,13 @@ class FileSpec(BaseModel): """ FileSpec """ # noqa: E501 - path: StrictStr = Field(description="The absolute path to the file on the device. Note that any existing file will be overwritten.") content: StrictStr = Field(description="The plain text (UTF-8) or base64-encoded content of the file.") - content_encoding: Optional[StrictStr] = Field(default=None, description="How the contents are encoded. Must be either \"plain\" or \"base64\". Defaults to \"plain\".", alias="contentEncoding") + content_encoding: Optional[EncodingType] = Field(default=None, alias="contentEncoding") mode: Optional[StrictInt] = Field(default=None, description="The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644.") user: Optional[StrictStr] = Field(default=None, description="The file's owner, specified either as a name or numeric ID. Defaults to \"root\".") group: Optional[StrictStr] = Field(default=None, description="The file's group, specified either as a name or numeric ID. Defaults to \"root\".") - __properties: ClassVar[List[str]] = ["path", "content", "contentEncoding", "mode", "user", "group"] - - @field_validator('content_encoding') - def content_encoding_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['plain', 'base64']): - raise ValueError("must be one of enum values ('plain', 'base64')") - return value + path: StrictStr = Field(description="The absolute path to a file on the system. Note that any existing file will be overwritten.") + __properties: ClassVar[List[str]] = ["content", "contentEncoding", "mode", "user", "group", "path"] model_config = ConfigDict( populate_by_name=True, @@ -96,12 +87,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "path": obj.get("path"), "content": obj.get("content"), "contentEncoding": obj.get("contentEncoding"), "mode": obj.get("mode"), "user": obj.get("user"), - "group": obj.get("group") + "group": obj.get("group"), + "path": obj.get("path") }) return _obj diff --git a/flightctl/models/image_application_provider.py b/flightctl/models/image_application_provider_spec.py similarity index 91% rename from flightctl/models/image_application_provider.py rename to flightctl/models/image_application_provider_spec.py index c96526e..f011064 100644 --- a/flightctl/models/image_application_provider.py +++ b/flightctl/models/image_application_provider_spec.py @@ -23,9 +23,9 @@ from typing import Optional, Set from typing_extensions import Self -class ImageApplicationProvider(BaseModel): +class ImageApplicationProviderSpec(BaseModel): """ - ImageApplicationProvider + ImageApplicationProviderSpec """ # noqa: E501 image: StrictStr = Field(description="Reference to the container image for the application package.") __properties: ClassVar[List[str]] = ["image"] @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ImageApplicationProvider from a JSON string""" + """Create an instance of ImageApplicationProviderSpec from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ImageApplicationProvider from a dict""" + """Create an instance of ImageApplicationProviderSpec from a dict""" if obj is None: return None diff --git a/flightctl/models/inline_application_provider_spec.py b/flightctl/models/inline_application_provider_spec.py new file mode 100644 index 0000000..eb513d2 --- /dev/null +++ b/flightctl/models/inline_application_provider_spec.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from flightctl.models.application_content import ApplicationContent +from typing import Optional, Set +from typing_extensions import Self + +class InlineApplicationProviderSpec(BaseModel): + """ + InlineApplicationProviderSpec + """ # noqa: E501 + inline: List[ApplicationContent] = Field(description="A list of application content.") + __properties: ClassVar[List[str]] = ["inline"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InlineApplicationProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in inline (list) + _items = [] + if self.inline: + for _item_inline in self.inline: + if _item_inline: + _items.append(_item_inline.to_dict()) + _dict['inline'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InlineApplicationProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None + }) + return _obj + + diff --git a/flightctl/models/relative_path.py b/flightctl/models/relative_path.py new file mode 100644 index 0000000..0d17388 --- /dev/null +++ b/flightctl/models/relative_path.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class RelativePath(BaseModel): + """ + Represents a relative file path. + """ # noqa: E501 + path: Optional[StrictStr] = Field(default=None, description="A relative file path on the system. Note that any existing file will be overwritten.") + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RelativePath from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RelativePath from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + return _obj + + diff --git a/flightctl/models/repository.py b/flightctl/models/repository.py index 36b6b79..fc7ab5f 100644 --- a/flightctl/models/repository.py +++ b/flightctl/models/repository.py @@ -33,7 +33,7 @@ class Repository(BaseModel): api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta - spec: Optional[RepositorySpec] = None + spec: RepositorySpec status: Optional[RepositoryStatus] = None __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "spec", "status"] diff --git a/pyproject.toml b/pyproject.toml index 536d9eb..dddb99c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Flight Control API" authors = ["The Flight Control Team "] license = "Apache 2.0" readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +repository = "https://github.com/flightctl/python-client" keywords = ["OpenAPI", "OpenAPI-Generator", "Flight Control API"] include = ["flightctl/py.typed"] diff --git a/test/test_absolute_path.py b/test/test_absolute_path.py new file mode 100644 index 0000000..eeb9425 --- /dev/null +++ b/test/test_absolute_path.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.absolute_path import AbsolutePath + +class TestAbsolutePath(unittest.TestCase): + """AbsolutePath unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AbsolutePath: + """Test AbsolutePath + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AbsolutePath` + """ + model = AbsolutePath() + if include_optional: + return AbsolutePath( + path = '/var/log/app.log' + ) + else: + return AbsolutePath( + ) + """ + + def testAbsolutePath(self): + """Test AbsolutePath""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_app_type.py b/test/test_app_type.py new file mode 100644 index 0000000..a3ae7d6 --- /dev/null +++ b/test/test_app_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.app_type import AppType + +class TestAppType(unittest.TestCase): + """AppType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAppType(self): + """Test AppType""" + # inst = AppType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_content.py b/test/test_application_content.py new file mode 100644 index 0000000..4cfc3c8 --- /dev/null +++ b/test/test_application_content.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.application_content import ApplicationContent + +class TestApplicationContent(unittest.TestCase): + """ApplicationContent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationContent: + """Test ApplicationContent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationContent` + """ + model = ApplicationContent() + if include_optional: + return ApplicationContent( + content = '', + content_encoding = 'plain', + path = 'src/index.js' + ) + else: + return ApplicationContent( + path = 'src/index.js', + ) + """ + + def testApplicationContent(self): + """Test ApplicationContent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_provider_spec.py b/test/test_application_provider_spec.py index bdd1995..f33409f 100644 --- a/test/test_application_provider_spec.py +++ b/test/test_application_provider_spec.py @@ -40,11 +40,18 @@ def make_instance(self, include_optional) -> ApplicationProviderSpec: 'key' : '' }, name = '', - image = '' + app_type = 'compose', + image = '', + inline = [ + null + ] ) else: return ApplicationProviderSpec( image = '', + inline = [ + null + ], ) """ diff --git a/test/test_certificatesigningrequest_api.py b/test/test_certificatesigningrequest_api.py index 53d5ec6..d8cce02 100644 --- a/test/test_certificatesigningrequest_api.py +++ b/test/test_certificatesigningrequest_api.py @@ -45,20 +45,20 @@ def test_delete_certificate_signing_requests(self) -> None: """ pass - def test_list_certificate_signing_requests(self) -> None: - """Test case for list_certificate_signing_requests + def test_get_certificate_signing_request(self) -> None: + """Test case for get_certificate_signing_request """ pass - def test_patch_certificate_signing_request(self) -> None: - """Test case for patch_certificate_signing_request + def test_list_certificate_signing_requests(self) -> None: + """Test case for list_certificate_signing_requests """ pass - def test_read_certificate_signing_request(self) -> None: - """Test case for read_certificate_signing_request + def test_patch_certificate_signing_request(self) -> None: + """Test case for patch_certificate_signing_request """ pass diff --git a/test/test_config_provider_spec.py b/test/test_config_provider_spec.py index fe48f1b..0335ae3 100644 --- a/test/test_config_provider_spec.py +++ b/test/test_config_provider_spec.py @@ -47,13 +47,7 @@ def make_instance(self, include_optional) -> ConfigProviderSpec: namespace = '', mount_path = '', ), inline = [ - flightctl.models.file_spec.FileSpec( - path = '', - content = '', - content_encoding = 'plain', - mode = 56, - user = '', - group = '', ) + null ], http_ref = flightctl.models.http_config_provider_spec_http_ref.HttpConfigProviderSpec_httpRef( repository = '', @@ -73,13 +67,7 @@ def make_instance(self, include_optional) -> ConfigProviderSpec: namespace = '', mount_path = '', ), inline = [ - flightctl.models.file_spec.FileSpec( - path = '', - content = '', - content_encoding = 'plain', - mode = 56, - user = '', - group = '', ) + null ], http_ref = flightctl.models.http_config_provider_spec_http_ref.HttpConfigProviderSpec_httpRef( repository = '', diff --git a/test/test_device_api.py b/test/test_device_api.py index 8cd0711..575cceb 100644 --- a/test/test_device_api.py +++ b/test/test_device_api.py @@ -51,38 +51,38 @@ def test_delete_devices(self) -> None: """ pass - def test_get_rendered_device(self) -> None: - """Test case for get_rendered_device + def test_get_device(self) -> None: + """Test case for get_device """ pass - def test_list_devices(self) -> None: - """Test case for list_devices + def test_get_device_status(self) -> None: + """Test case for get_device_status """ pass - def test_patch_device(self) -> None: - """Test case for patch_device + def test_get_rendered_device(self) -> None: + """Test case for get_rendered_device """ pass - def test_patch_device_status(self) -> None: - """Test case for patch_device_status + def test_list_devices(self) -> None: + """Test case for list_devices """ pass - def test_read_device(self) -> None: - """Test case for read_device + def test_patch_device(self) -> None: + """Test case for patch_device """ pass - def test_read_device_status(self) -> None: - """Test case for read_device_status + def test_patch_device_status(self) -> None: + """Test case for patch_device_status """ pass diff --git a/test/test_encoding_type.py b/test/test_encoding_type.py new file mode 100644 index 0000000..73efb83 --- /dev/null +++ b/test/test_encoding_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.encoding_type import EncodingType + +class TestEncodingType(unittest.TestCase): + """EncodingType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEncodingType(self): + """Test EncodingType""" + # inst = EncodingType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_enrollmentrequest_api.py b/test/test_enrollmentrequest_api.py index 7756cc9..510d23c 100644 --- a/test/test_enrollmentrequest_api.py +++ b/test/test_enrollmentrequest_api.py @@ -57,32 +57,32 @@ def test_get_enrollment_config(self) -> None: """ pass - def test_list_enrollment_requests(self) -> None: - """Test case for list_enrollment_requests + def test_get_enrollment_request(self) -> None: + """Test case for get_enrollment_request """ pass - def test_patch_enrollment_request(self) -> None: - """Test case for patch_enrollment_request + def test_get_enrollment_request_status(self) -> None: + """Test case for get_enrollment_request_status """ pass - def test_patch_enrollment_request_status(self) -> None: - """Test case for patch_enrollment_request_status + def test_list_enrollment_requests(self) -> None: + """Test case for list_enrollment_requests """ pass - def test_read_enrollment_request(self) -> None: - """Test case for read_enrollment_request + def test_patch_enrollment_request(self) -> None: + """Test case for patch_enrollment_request """ pass - def test_read_enrollment_request_status(self) -> None: - """Test case for read_enrollment_request_status + def test_patch_enrollment_request_status(self) -> None: + """Test case for patch_enrollment_request_status """ pass diff --git a/test/test_file_content.py b/test/test_file_content.py new file mode 100644 index 0000000..425adf2 --- /dev/null +++ b/test/test_file_content.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.file_content import FileContent + +class TestFileContent(unittest.TestCase): + """FileContent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileContent: + """Test FileContent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileContent` + """ + model = FileContent() + if include_optional: + return FileContent( + content = '', + content_encoding = 'plain' + ) + else: + return FileContent( + ) + """ + + def testFileContent(self): + """Test FileContent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_metadata.py b/test/test_file_metadata.py new file mode 100644 index 0000000..8b0f16c --- /dev/null +++ b/test/test_file_metadata.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.file_metadata import FileMetadata + +class TestFileMetadata(unittest.TestCase): + """FileMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FileMetadata: + """Test FileMetadata + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FileMetadata` + """ + model = FileMetadata() + if include_optional: + return FileMetadata( + mode = 56, + user = '', + group = '' + ) + else: + return FileMetadata( + ) + """ + + def testFileMetadata(self): + """Test FileMetadata""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_file_spec.py b/test/test_file_spec.py index 58ad16f..0c8dce0 100644 --- a/test/test_file_spec.py +++ b/test/test_file_spec.py @@ -36,17 +36,17 @@ def make_instance(self, include_optional) -> FileSpec: model = FileSpec() if include_optional: return FileSpec( - path = '', content = '', content_encoding = 'plain', mode = 56, user = '', - group = '' + group = '', + path = '/var/log/app.log' ) else: return FileSpec( - path = '', content = '', + path = '/var/log/app.log', ) """ diff --git a/test/test_fleet_api.py b/test/test_fleet_api.py index fd25860..dde31f8 100644 --- a/test/test_fleet_api.py +++ b/test/test_fleet_api.py @@ -57,44 +57,44 @@ def test_delete_template_versions(self) -> None: """ pass - def test_list_fleets(self) -> None: - """Test case for list_fleets + def test_get_fleet(self) -> None: + """Test case for get_fleet """ pass - def test_list_template_versions(self) -> None: - """Test case for list_template_versions + def test_get_fleet_status(self) -> None: + """Test case for get_fleet_status """ pass - def test_patch_fleet(self) -> None: - """Test case for patch_fleet + def test_get_template_version(self) -> None: + """Test case for get_template_version """ pass - def test_patch_fleet_status(self) -> None: - """Test case for patch_fleet_status + def test_list_fleets(self) -> None: + """Test case for list_fleets """ pass - def test_read_fleet(self) -> None: - """Test case for read_fleet + def test_list_template_versions(self) -> None: + """Test case for list_template_versions """ pass - def test_read_fleet_status(self) -> None: - """Test case for read_fleet_status + def test_patch_fleet(self) -> None: + """Test case for patch_fleet """ pass - def test_read_template_version(self) -> None: - """Test case for read_template_version + def test_patch_fleet_status(self) -> None: + """Test case for patch_fleet_status """ pass diff --git a/test/test_image_application_provider.py b/test/test_image_application_provider_spec.py similarity index 68% rename from test/test_image_application_provider.py rename to test/test_image_application_provider_spec.py index cab32fe..da87767 100644 --- a/test/test_image_application_provider.py +++ b/test/test_image_application_provider_spec.py @@ -15,10 +15,10 @@ import unittest -from flightctl.models.image_application_provider import ImageApplicationProvider +from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec -class TestImageApplicationProvider(unittest.TestCase): - """ImageApplicationProvider unit test stubs""" +class TestImageApplicationProviderSpec(unittest.TestCase): + """ImageApplicationProviderSpec unit test stubs""" def setUp(self): pass @@ -26,26 +26,26 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> ImageApplicationProvider: - """Test ImageApplicationProvider + def make_instance(self, include_optional) -> ImageApplicationProviderSpec: + """Test ImageApplicationProviderSpec include_optional is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `ImageApplicationProvider` + # uncomment below to create an instance of `ImageApplicationProviderSpec` """ - model = ImageApplicationProvider() + model = ImageApplicationProviderSpec() if include_optional: - return ImageApplicationProvider( + return ImageApplicationProviderSpec( image = '' ) else: - return ImageApplicationProvider( + return ImageApplicationProviderSpec( image = '', ) """ - def testImageApplicationProvider(self): - """Test ImageApplicationProvider""" + def testImageApplicationProviderSpec(self): + """Test ImageApplicationProviderSpec""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_inline_application_provider_spec.py b/test/test_inline_application_provider_spec.py new file mode 100644 index 0000000..cb9144f --- /dev/null +++ b/test/test_inline_application_provider_spec.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec + +class TestInlineApplicationProviderSpec(unittest.TestCase): + """InlineApplicationProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> InlineApplicationProviderSpec: + """Test InlineApplicationProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `InlineApplicationProviderSpec` + """ + model = InlineApplicationProviderSpec() + if include_optional: + return InlineApplicationProviderSpec( + inline = [ + null + ] + ) + else: + return InlineApplicationProviderSpec( + inline = [ + null + ], + ) + """ + + def testInlineApplicationProviderSpec(self): + """Test InlineApplicationProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_config_provider_spec.py b/test/test_inline_config_provider_spec.py index 0355114..fe177f1 100644 --- a/test/test_inline_config_provider_spec.py +++ b/test/test_inline_config_provider_spec.py @@ -38,26 +38,14 @@ def make_instance(self, include_optional) -> InlineConfigProviderSpec: return InlineConfigProviderSpec( name = '', inline = [ - flightctl.models.file_spec.FileSpec( - path = '', - content = '', - content_encoding = 'plain', - mode = 56, - user = '', - group = '', ) + null ] ) else: return InlineConfigProviderSpec( name = '', inline = [ - flightctl.models.file_spec.FileSpec( - path = '', - content = '', - content_encoding = 'plain', - mode = 56, - user = '', - group = '', ) + null ], ) """ diff --git a/test/test_labels_api.py b/test/test_labels_api.py new file mode 100644 index 0000000..f0d5548 --- /dev/null +++ b/test/test_labels_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.api.labels_api import LabelsApi + + +class TestLabelsApi(unittest.TestCase): + """LabelsApi unit test stubs""" + + def setUp(self) -> None: + self.api = LabelsApi() + + def tearDown(self) -> None: + pass + + def test_list_labels(self) -> None: + """Test case for list_labels + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_relative_path.py b/test/test_relative_path.py new file mode 100644 index 0000000..d0e0d37 --- /dev/null +++ b/test/test_relative_path.py @@ -0,0 +1,52 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.relative_path import RelativePath + +class TestRelativePath(unittest.TestCase): + """RelativePath unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RelativePath: + """Test RelativePath + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RelativePath` + """ + model = RelativePath() + if include_optional: + return RelativePath( + path = 'src/index.js' + ) + else: + return RelativePath( + ) + """ + + def testRelativePath(self): + """Test RelativePath""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_repository_api.py b/test/test_repository_api.py index 45833a9..b69329d 100644 --- a/test/test_repository_api.py +++ b/test/test_repository_api.py @@ -45,20 +45,20 @@ def test_delete_repository(self) -> None: """ pass - def test_list_repositories(self) -> None: - """Test case for list_repositories + def test_get_repository(self) -> None: + """Test case for get_repository """ pass - def test_patch_repository(self) -> None: - """Test case for patch_repository + def test_list_repositories(self) -> None: + """Test case for list_repositories """ pass - def test_read_repository(self) -> None: - """Test case for read_repository + def test_patch_repository(self) -> None: + """Test case for patch_repository """ pass diff --git a/test/test_resourcesync_api.py b/test/test_resourcesync_api.py index 8a247cc..74d8f7f 100644 --- a/test/test_resourcesync_api.py +++ b/test/test_resourcesync_api.py @@ -45,20 +45,20 @@ def test_delete_resource_syncs(self) -> None: """ pass - def test_list_resource_sync(self) -> None: - """Test case for list_resource_sync + def test_get_resource_sync(self) -> None: + """Test case for get_resource_sync """ pass - def test_patch_resource_sync(self) -> None: - """Test case for patch_resource_sync + def test_list_resource_syncs(self) -> None: + """Test case for list_resource_syncs """ pass - def test_read_resource_sync(self) -> None: - """Test case for read_resource_sync + def test_patch_resource_sync(self) -> None: + """Test case for patch_resource_sync """ pass