diff --git a/sdk/OWNERS b/sdk/OWNERS new file mode 100644 index 000000000..50b12e1ef --- /dev/null +++ b/sdk/OWNERS @@ -0,0 +1,5 @@ +# The OWNERS file is used by prow to automatically merge approved PRs. + +approvers: +- jinchihe + diff --git a/sdk/hack/.gitignore b/sdk/hack/.gitignore new file mode 100644 index 000000000..f681e18b6 --- /dev/null +++ b/sdk/hack/.gitignore @@ -0,0 +1,2 @@ +openapi-generator-cli.jar +swagger.json diff --git a/sdk/hack/README.md b/sdk/hack/README.md new file mode 100644 index 000000000..53ad874fb --- /dev/null +++ b/sdk/hack/README.md @@ -0,0 +1,55 @@ + +# Readme for Generating Tekton Pipeline SDK + +The guide shows how to generate the openapi model and swagger.json file from Tekton Pipeline types using `openapi-gen` and generate Tekton Pipeline Python SDK Client for the Python object models using `openapi-generator`. Also show how to upload the Tekton Pipeline SDK to Pypi. + +## Update openapi spec and swagger file. + +Download `tektoncd/pipeline` repository, and execute the below script to generate openapi spec and swagger file. + +``` +./hack/update-openapigen.sh +``` +After executing, the `openapi_generated.go` and `swagger.json` are refreshed under `pkg/apis/pipeline/v1beta1/`. + +And then copy the `pkg/apis/pipeline/v1beta1/swagger.json` to the `sdk/hack` in this repo. If not copy, the `sdk-gen.sh` will download from github directly. + +## Generate Tekton Pipeline Python SDK + +Execute the script `/sdk/hack/sdk-gen.sh` to install openapi-generator and generate Tekton Pipeline Python SDK. + +``` +./sdk/hack/sdk-gen.sh +``` +After the script execution, the Tekton Pipeline Python SDK is generated in the `./sdk/python` directory. Some files such as [README](../python/README.md) and setup.py need to be merged manually after the script execution. + +## (Optional) Refresh Python SDK in the Pypi + +Navigate to `sdk/python/tekton` directory. + +1. Install `twine`: + + ```bash + pip install twine + ``` + +2. Update the Tekton Pipeline Python SDK version in the [setup.py](../python/setup.py). + +3. Create some distributions in the normal way: + + ```bash + python setup.py sdist bdist_wheel + ``` + +4. Upload with twine to [Test PyPI](https://packaging.python.org/guides/using-testpypi/) and verify things look right. `Twine` will automatically prompt for your username and password: + ```bash + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + username: ... + password: + ... + ``` + +5. Upload to [PyPI](https://pypi.org/project/tekton-pipeline/): + ```bash + twine upload dist/* + ``` diff --git a/sdk/hack/boilerplate.python.txt b/sdk/hack/boilerplate.python.txt new file mode 100644 index 000000000..57ae038a5 --- /dev/null +++ b/sdk/hack/boilerplate.python.txt @@ -0,0 +1,14 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/sdk/hack/sdk-gen.sh b/sdk/hack/sdk-gen.sh new file mode 100755 index 000000000..3dd90e350 --- /dev/null +++ b/sdk/hack/sdk-gen.sh @@ -0,0 +1,78 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset + +OPENAPI_GEN_URL="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar" +OPENAPI_GEN_JAR="sdk/hack/openapi-generator-cli.jar" +SWAGGER_CODEGEN_CONF="sdk/hack/swagger_config.json" +SWAGGER_CODEGEN_FILE="sdk/hack/swagger.json" +SWAGGER_CODEGEN_SOURCE="https://github.com/tektoncd/pipeline/tree/master/pkg/apis/pipeline/v1beta1/swagger.json" +SDK_OUTPUT_PATH="./sdk/python" + +echo "Check the swagger.json file ..." +if [ ! -f ${SWAGGER_CODEGEN_FILE} ] +then + wget -O ${SWAGGER_CODEGEN_FILE} ${SWAGGER_CODEGEN_SOURCE} +fi + +echo "Downloading the swagger-codegen JAR package ..." +if [ ! -f ${OPENAPI_GEN_JAR} ] +then + wget -O ${OPENAPI_GEN_JAR} ${OPENAPI_GEN_URL} +fi + +echo "Generating Python SDK for Tekton Pipeline ..." +java -jar ${OPENAPI_GEN_JAR} generate -i ${SWAGGER_CODEGEN_FILE} -g python -o ${SDK_OUTPUT_PATH} -c ${SWAGGER_CODEGEN_CONF} + +echo "Adding Python boilerplate message ..." +for i in $(find ./sdk/python -name *.py) +do + if ! grep -q Copyright $i + then + cat sdk/hack/boilerplate.python.txt $i >$i.new && mv $i.new $i + fi +done + +echo "Replace Kubernetes document link ..." +MAPPING_LIST=`grep V1 ${SWAGGER_CODEGEN_CONF} |awk -F '"' '{print $2}'` +K8S_URL='https://github.com/kubernetes-client/python/blob/master/kubernetes/docs' +for map in ${MAPPING_LIST} +do + sed -i'.bak' -e "s@($map.md)@($K8S_URL/$map.md)@g" ./sdk/python/docs/* + rm -rf ./sdk/python/docs/*.bak +done + +echo "Update some specify files ..." +git checkout ${SDK_OUTPUT_PATH}/setup.py +git checkout ${SDK_OUTPUT_PATH}/requirements.txt +# Better to merge README file munally. +#git checkout ${SDK_OUTPUT_PATH}/README.md + +if ! grep -q "TektonClient" ${SDK_OUTPUT_PATH}/tekton/__init__.py +then +echo "from tekton.api.tekton_client import TektonClient" >> ${SDK_OUTPUT_PATH}/tekton/__init__.py +fi + +if ! grep -q "constants" ${SDK_OUTPUT_PATH}/tekton/__init__.py +then +echo "from tekton.constants import constants" >> ${SDK_OUTPUT_PATH}/tekton/__init__.py +fi + +echo "Tekton Pipeline Python SDK is generated successfully to folder ${SDK_OUTPUT_PATH}/." + + diff --git a/sdk/hack/swagger_config.json b/sdk/hack/swagger_config.json new file mode 100644 index 000000000..e470fad48 --- /dev/null +++ b/sdk/hack/swagger_config.json @@ -0,0 +1,34 @@ +{ + "packageName" : "tekton", + "projectName" : "tekton", + "packageVersion": "0.1", + "importMappings": { + "V1Container": "from kubernetes.client import V1Container", + "V1ObjectMeta": "from kubernetes.client import V1ObjectMeta", + "V1ListMeta": "from kubernetes.client import V1ListMeta", + "V1Volume": "from kubernetes.client import V1Volume", + "V1ResourceRequirements": "from kubernetes.client import V1ResourceRequirements", + "V1ContainerPort": "from kubernetes.client import V1ContainerPort", + "V1EnvFromSource": "from kubernetes.client import V1EnvFromSource", + "V1EnvVar": "from kubernetes.client import V1EnvVar", + "V1Lifecycle": "from kubernetes.client import V1Lifecycle", + "V1Probe": "from kubernetes.client import V1Probe", + "V1SecurityContext": "from kubernetes.client import V1SecurityContext", + "V1VolumeDevice": "from kubernetes.client import V1VolumeDevice", + "V1VolumeMount": "from kubernetes.client import V1VolumeMount", + "V1ConfigMapVolumeSource": "from kubernetes.client import V1ConfigMapVolumeSource", + "V1EmptyDirVolumeSource": "from kubernetes.client import V1EmptyDirVolumeSource", + "V1PersistentVolumeClaim": "from kubernetes.client import V1PersistentVolumeClaim", + "V1PersistentVolumeClaimVolumeSource": "from kubernetes.client import V1PersistentVolumeClaimVolumeSource", + "V1SecretVolumeSource": "from kubernetes.client import V1SecretVolumeSource", + "V1ContainerStateRunning": "from kubernetes.client import V1ContainerStateRunning", + "V1ContainerStateTerminated": "from kubernetes.client import V1ContainerStateTerminated", + "V1ContainerStateWaiting": "from kubernetes.client import V1ContainerStateWaiting", + "V1ContainerState": "from kubernetes.client import V1ContainerState", + "V1Affinity": "from kubernetes.client import V1Affinity", + "V1LocalObjectReference": "from kubernetes.client import V1LocalObjectReference", + "V1PodDNSConfig": "from kubernetes.client import V1PodDNSConfig", + "V1PodSecurityContext": "from kubernetes.client import V1PodSecurityContext", + "V1Toleration": "from kubernetes.client import V1Toleration" + } +} diff --git a/sdk/python/.gitignore b/sdk/python/.gitignore new file mode 100644 index 000000000..500ddc34e --- /dev/null +++ b/sdk/python/.gitignore @@ -0,0 +1,75 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints + +#SDK +.swagger-codegen-ignore +.swagger-codegen/ +.travis.yml +git_push.sh +tox.ini +.gitlab-ci.yml + +.openapi-generator/ +git_push.sh diff --git a/sdk/python/.openapi-generator-ignore b/sdk/python/.openapi-generator-ignore new file mode 100644 index 000000000..c5fa491b4 --- /dev/null +++ b/sdk/python/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/sdk/python/README.md b/sdk/python/README.md new file mode 100644 index 000000000..d96c23144 --- /dev/null +++ b/sdk/python/README.md @@ -0,0 +1,114 @@ +# tekton +Python SDK for Tekton Pipeline + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +Tekton Pipeline Python SDK can be installed by `pip` or `Setuptools`. + +```sh +pip install tekton-pipeline +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the [examples](examples/taskrun.ipynb) + + +## Documentation for API Endpoints + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +[TektonClient](docs/TektonClient.md) | [create](docs/TektonClient.md#create) | Create Tekton object| +[TektonClient](docs/TektonClient.md) | [get](docs/TektonClient.md#get) | get Tekton object| +[TektonClient](docs/TektonClient.md) | [delete](docs/TektonClient.md#delete) | delete Tekton object| + +## Documentation For Models + + - [PodTemplate](docs/PodTemplate.md) + - [V1alpha1PipelineResource](docs/V1alpha1PipelineResource.md) + - [V1alpha1PipelineResourceList](docs/V1alpha1PipelineResourceList.md) + - [V1alpha1PipelineResourceSpec](docs/V1alpha1PipelineResourceSpec.md) + - [V1alpha1PipelineResourceStatus](docs/V1alpha1PipelineResourceStatus.md) + - [V1alpha1ResourceDeclaration](docs/V1alpha1ResourceDeclaration.md) + - [V1alpha1ResourceParam](docs/V1alpha1ResourceParam.md) + - [V1alpha1SecretParam](docs/V1alpha1SecretParam.md) + - [V1beta1ArrayOrString](docs/V1beta1ArrayOrString.md) + - [V1beta1CannotConvertError](docs/V1beta1CannotConvertError.md) + - [V1beta1CloudEventDelivery](docs/V1beta1CloudEventDelivery.md) + - [V1beta1CloudEventDeliveryState](docs/V1beta1CloudEventDeliveryState.md) + - [V1beta1ClusterTask](docs/V1beta1ClusterTask.md) + - [V1beta1ClusterTaskList](docs/V1beta1ClusterTaskList.md) + - [V1beta1ConditionCheck](docs/V1beta1ConditionCheck.md) + - [V1beta1ConditionCheckStatus](docs/V1beta1ConditionCheckStatus.md) + - [V1beta1ConditionCheckStatusFields](docs/V1beta1ConditionCheckStatusFields.md) + - [V1beta1InternalTaskModifier](docs/V1beta1InternalTaskModifier.md) + - [V1beta1Param](docs/V1beta1Param.md) + - [V1beta1ParamSpec](docs/V1beta1ParamSpec.md) + - [V1beta1Pipeline](docs/V1beta1Pipeline.md) + - [V1beta1PipelineDeclaredResource](docs/V1beta1PipelineDeclaredResource.md) + - [V1beta1PipelineList](docs/V1beta1PipelineList.md) + - [V1beta1PipelineRef](docs/V1beta1PipelineRef.md) + - [V1beta1PipelineResourceBinding](docs/V1beta1PipelineResourceBinding.md) + - [V1beta1PipelineResourceRef](docs/V1beta1PipelineResourceRef.md) + - [V1beta1PipelineResourceResult](docs/V1beta1PipelineResourceResult.md) + - [V1beta1PipelineResult](docs/V1beta1PipelineResult.md) + - [V1beta1PipelineRun](docs/V1beta1PipelineRun.md) + - [V1beta1PipelineRunConditionCheckStatus](docs/V1beta1PipelineRunConditionCheckStatus.md) + - [V1beta1PipelineRunList](docs/V1beta1PipelineRunList.md) + - [V1beta1PipelineRunResult](docs/V1beta1PipelineRunResult.md) + - [V1beta1PipelineRunSpec](docs/V1beta1PipelineRunSpec.md) + - [V1beta1PipelineRunSpecServiceAccountName](docs/V1beta1PipelineRunSpecServiceAccountName.md) + - [V1beta1PipelineRunStatus](docs/V1beta1PipelineRunStatus.md) + - [V1beta1PipelineRunStatusFields](docs/V1beta1PipelineRunStatusFields.md) + - [V1beta1PipelineRunTaskRunStatus](docs/V1beta1PipelineRunTaskRunStatus.md) + - [V1beta1PipelineSpec](docs/V1beta1PipelineSpec.md) + - [V1beta1PipelineTask](docs/V1beta1PipelineTask.md) + - [V1beta1PipelineTaskCondition](docs/V1beta1PipelineTaskCondition.md) + - [V1beta1PipelineTaskInputResource](docs/V1beta1PipelineTaskInputResource.md) + - [V1beta1PipelineTaskOutputResource](docs/V1beta1PipelineTaskOutputResource.md) + - [V1beta1PipelineTaskParam](docs/V1beta1PipelineTaskParam.md) + - [V1beta1PipelineTaskResources](docs/V1beta1PipelineTaskResources.md) + - [V1beta1PipelineTaskRun](docs/V1beta1PipelineTaskRun.md) + - [V1beta1PipelineTaskRunSpec](docs/V1beta1PipelineTaskRunSpec.md) + - [V1beta1PipelineWorkspaceDeclaration](docs/V1beta1PipelineWorkspaceDeclaration.md) + - [V1beta1ResultRef](docs/V1beta1ResultRef.md) + - [V1beta1Sidecar](docs/V1beta1Sidecar.md) + - [V1beta1SidecarState](docs/V1beta1SidecarState.md) + - [V1beta1Step](docs/V1beta1Step.md) + - [V1beta1StepState](docs/V1beta1StepState.md) + - [V1beta1Task](docs/V1beta1Task.md) + - [V1beta1TaskList](docs/V1beta1TaskList.md) + - [V1beta1TaskRef](docs/V1beta1TaskRef.md) + - [V1beta1TaskResource](docs/V1beta1TaskResource.md) + - [V1beta1TaskResourceBinding](docs/V1beta1TaskResourceBinding.md) + - [V1beta1TaskResources](docs/V1beta1TaskResources.md) + - [V1beta1TaskResult](docs/V1beta1TaskResult.md) + - [V1beta1TaskRun](docs/V1beta1TaskRun.md) + - [V1beta1TaskRunInputs](docs/V1beta1TaskRunInputs.md) + - [V1beta1TaskRunList](docs/V1beta1TaskRunList.md) + - [V1beta1TaskRunOutputs](docs/V1beta1TaskRunOutputs.md) + - [V1beta1TaskRunResources](docs/V1beta1TaskRunResources.md) + - [V1beta1TaskRunResult](docs/V1beta1TaskRunResult.md) + - [V1beta1TaskRunSpec](docs/V1beta1TaskRunSpec.md) + - [V1beta1TaskRunStatus](docs/V1beta1TaskRunStatus.md) + - [V1beta1TaskRunStatusFields](docs/V1beta1TaskRunStatusFields.md) + - [V1beta1TaskSpec](docs/V1beta1TaskSpec.md) + - [V1beta1WorkspaceBinding](docs/V1beta1WorkspaceBinding.md) + - [V1beta1WorkspaceDeclaration](docs/V1beta1WorkspaceDeclaration.md) + - [V1beta1WorkspacePipelineTaskBinding](docs/V1beta1WorkspacePipelineTaskBinding.md) + + diff --git a/sdk/python/docs/PodTemplate.md b/sdk/python/docs/PodTemplate.md new file mode 100644 index 000000000..f8e8afa3d --- /dev/null +++ b/sdk/python/docs/PodTemplate.md @@ -0,0 +1,24 @@ +# PodTemplate + +PodTemplate holds pod specific configuration +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**affinity** | [**V1Affinity**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Affinity.md) | | [optional] +**automount_service_account_token** | **bool** | AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. | [optional] +**dns_config** | [**V1PodDNSConfig**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PodDNSConfig.md) | | [optional] +**dns_policy** | **str** | Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. | [optional] +**enable_service_links** | **bool** | EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true. | [optional] +**host_network** | **bool** | HostNetwork specifies whether the pod may use the node network namespace | [optional] +**image_pull_secrets** | [**list[V1LocalObjectReference]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1LocalObjectReference.md) | ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified | [optional] +**node_selector** | **dict(str, str)** | NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | [optional] +**priority_class_name** | **str** | If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. | [optional] +**runtime_class_name** | **str** | RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14. | [optional] +**scheduler_name** | **str** | SchedulerName specifies the scheduler to be used to dispatch the Pod | [optional] +**security_context** | [**V1PodSecurityContext**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PodSecurityContext.md) | | [optional] +**tolerations** | [**list[V1Toleration]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Toleration.md) | If specified, the pod's tolerations. | [optional] +**volumes** | [**list[V1Volume]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md) | List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes | [optional] + +[[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/sdk/python/docs/V1alpha1PipelineResource.md b/sdk/python/docs/V1alpha1PipelineResource.md new file mode 100644 index 000000000..f397df0f4 --- /dev/null +++ b/sdk/python/docs/V1alpha1PipelineResource.md @@ -0,0 +1,15 @@ +# V1alpha1PipelineResource + +PipelineResource describes a resource that is an input to or output from a Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1alpha1PipelineResourceSpec**](V1alpha1PipelineResourceSpec.md) | | [optional] +**status** | [**object**](.md) | PipelineResourceStatus does not contain anything because PipelineResources on their own do not have a status Deprecated | [optional] + +[[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/sdk/python/docs/V1alpha1PipelineResourceList.md b/sdk/python/docs/V1alpha1PipelineResourceList.md new file mode 100644 index 000000000..36ad53b86 --- /dev/null +++ b/sdk/python/docs/V1alpha1PipelineResourceList.md @@ -0,0 +1,14 @@ +# V1alpha1PipelineResourceList + +PipelineResourceList contains a list of PipelineResources +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1alpha1PipelineResource]**](V1alpha1PipelineResource.md) | | +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1alpha1PipelineResourceSpec.md b/sdk/python/docs/V1alpha1PipelineResourceSpec.md new file mode 100644 index 000000000..bb4293d72 --- /dev/null +++ b/sdk/python/docs/V1alpha1PipelineResourceSpec.md @@ -0,0 +1,14 @@ +# V1alpha1PipelineResourceSpec + +PipelineResourceSpec defines an individual resources used in the pipeline. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the resource that may be used to populate a UI. | [optional] +**params** | [**list[V1alpha1ResourceParam]**](V1alpha1ResourceParam.md) | | +**secrets** | [**list[V1alpha1SecretParam]**](V1alpha1SecretParam.md) | Secrets to fetch to populate some of resource fields | [optional] +**type** | **str** | | + +[[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/sdk/python/docs/V1alpha1ResourceDeclaration.md b/sdk/python/docs/V1alpha1ResourceDeclaration.md new file mode 100644 index 000000000..e1c4af7b3 --- /dev/null +++ b/sdk/python/docs/V1alpha1ResourceDeclaration.md @@ -0,0 +1,15 @@ +# V1alpha1ResourceDeclaration + +ResourceDeclaration defines an input or output PipelineResource declared as a requirement by another type such as a Task or Condition. The Name field will be used to refer to these PipelineResources within the type's definition, and when provided as an Input, the Name will be the path to the volume mounted containing this PipelineResource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the declared resource that may be used to populate a UI. | [optional] +**name** | **str** | Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. | +**optional** | **bool** | Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) | [optional] +**target_path** | **str** | TargetPath is the path in workspace directory where the resource will be copied. | [optional] +**type** | **str** | Type is the type of this resource; | + +[[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/sdk/python/docs/V1alpha1ResourceParam.md b/sdk/python/docs/V1alpha1ResourceParam.md new file mode 100644 index 000000000..7f9b9718c --- /dev/null +++ b/sdk/python/docs/V1alpha1ResourceParam.md @@ -0,0 +1,12 @@ +# V1alpha1ResourceParam + +ResourceParam declares a string value to use for the parameter called Name, and is used in the specific context of PipelineResources. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | | + +[[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/sdk/python/docs/V1alpha1SecretParam.md b/sdk/python/docs/V1alpha1SecretParam.md new file mode 100644 index 000000000..cca1c0d23 --- /dev/null +++ b/sdk/python/docs/V1alpha1SecretParam.md @@ -0,0 +1,13 @@ +# V1alpha1SecretParam + +SecretParam indicates which secret can be used to populate a field of the resource +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_name** | **str** | | +**secret_key** | **str** | | +**secret_name** | **str** | | + +[[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/sdk/python/docs/V1beta1ArrayOrString.md b/sdk/python/docs/V1beta1ArrayOrString.md new file mode 100644 index 000000000..5da4e34c9 --- /dev/null +++ b/sdk/python/docs/V1beta1ArrayOrString.md @@ -0,0 +1,13 @@ +# V1beta1ArrayOrString + +ArrayOrString is a type that can hold a single string or string array. Used in JSON unmarshalling so that a single JSON field can accept either an individual string or an array of strings. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**array_val** | **list[str]** | | +**string_val** | **str** | Represents the stored type of ArrayOrString. | +**type** | **str** | | + +[[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/sdk/python/docs/V1beta1CannotConvertError.md b/sdk/python/docs/V1beta1CannotConvertError.md new file mode 100644 index 000000000..47b5c6000 --- /dev/null +++ b/sdk/python/docs/V1beta1CannotConvertError.md @@ -0,0 +1,12 @@ +# V1beta1CannotConvertError + +CannotConvertError is returned when a field cannot be converted. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | | +**message** | **str** | | + +[[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/sdk/python/docs/V1beta1CloudEventDelivery.md b/sdk/python/docs/V1beta1CloudEventDelivery.md new file mode 100644 index 000000000..73d87c15f --- /dev/null +++ b/sdk/python/docs/V1beta1CloudEventDelivery.md @@ -0,0 +1,12 @@ +# V1beta1CloudEventDelivery + +CloudEventDelivery is the target of a cloud event along with the state of delivery. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**V1beta1CloudEventDeliveryState**](V1beta1CloudEventDeliveryState.md) | | [optional] +**target** | **str** | Target points to an addressable | [optional] + +[[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/sdk/python/docs/V1beta1CloudEventDeliveryState.md b/sdk/python/docs/V1beta1CloudEventDeliveryState.md new file mode 100644 index 000000000..7b6802a2e --- /dev/null +++ b/sdk/python/docs/V1beta1CloudEventDeliveryState.md @@ -0,0 +1,14 @@ +# V1beta1CloudEventDeliveryState + +CloudEventDeliveryState reports the state of a cloud event to be sent. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition** | **str** | Current status | [optional] +**message** | **str** | Error is the text of error (if any) | +**retry_count** | **int** | RetryCount is the number of attempts of sending the cloud event | +**sent_at** | [**V1Time**](V1Time.md) | | [optional] + +[[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/sdk/python/docs/V1beta1ClusterTask.md b/sdk/python/docs/V1beta1ClusterTask.md new file mode 100644 index 000000000..10bdb1df6 --- /dev/null +++ b/sdk/python/docs/V1beta1ClusterTask.md @@ -0,0 +1,14 @@ +# V1beta1ClusterTask + +ClusterTask is a Task with a cluster scope. ClusterTasks are used to represent Tasks that should be publicly addressable from any namespace in the cluster. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1TaskSpec**](V1beta1TaskSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1ClusterTaskList.md b/sdk/python/docs/V1beta1ClusterTaskList.md new file mode 100644 index 000000000..1cb90b673 --- /dev/null +++ b/sdk/python/docs/V1beta1ClusterTaskList.md @@ -0,0 +1,14 @@ +# V1beta1ClusterTaskList + +ClusterTaskList contains a list of ClusterTask +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1beta1ClusterTask]**](V1beta1ClusterTask.md) | | +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1beta1ConditionCheck.md b/sdk/python/docs/V1beta1ConditionCheck.md new file mode 100644 index 000000000..dbb24d32d --- /dev/null +++ b/sdk/python/docs/V1beta1ConditionCheck.md @@ -0,0 +1,15 @@ +# V1beta1ConditionCheck + +ConditionCheck represents a single evaluation of a Condition step. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1TaskRunSpec**](V1beta1TaskRunSpec.md) | | [optional] +**status** | [**V1beta1TaskRunStatus**](V1beta1TaskRunStatus.md) | | [optional] + +[[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/sdk/python/docs/V1beta1ConditionCheckStatus.md b/sdk/python/docs/V1beta1ConditionCheckStatus.md new file mode 100644 index 000000000..16264a09d --- /dev/null +++ b/sdk/python/docs/V1beta1ConditionCheckStatus.md @@ -0,0 +1,17 @@ +# V1beta1ConditionCheckStatus + +ConditionCheckStatus defines the observed state of ConditionCheck +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**annotations** | **dict(str, str)** | Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. | [optional] +**check** | [**V1ContainerState**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerState.md) | | [optional] +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**conditions** | [**list[KnativeCondition]**](KnativeCondition.md) | Conditions the latest available observations of a resource's current state. | [optional] +**observed_generation** | **int** | ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. | [optional] +**pod_name** | **str** | PodName is the name of the pod responsible for executing this condition check. | +**start_time** | [**V1Time**](V1Time.md) | | [optional] + +[[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/sdk/python/docs/V1beta1ConditionCheckStatusFields.md b/sdk/python/docs/V1beta1ConditionCheckStatusFields.md new file mode 100644 index 000000000..37c72a895 --- /dev/null +++ b/sdk/python/docs/V1beta1ConditionCheckStatusFields.md @@ -0,0 +1,14 @@ +# V1beta1ConditionCheckStatusFields + +ConditionCheckStatusFields holds the fields of ConfigurationCheck's status. This is defined separately and inlined so that other types can readily consume these fields via duck typing. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**check** | [**V1ContainerState**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerState.md) | | [optional] +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**pod_name** | **str** | PodName is the name of the pod responsible for executing this condition check. | +**start_time** | [**V1Time**](V1Time.md) | | [optional] + +[[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/sdk/python/docs/V1beta1EmbeddedTask.md b/sdk/python/docs/V1beta1EmbeddedTask.md new file mode 100644 index 000000000..6f083f9a2 --- /dev/null +++ b/sdk/python/docs/V1beta1EmbeddedTask.md @@ -0,0 +1,19 @@ +# V1beta1EmbeddedTask + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the task that may be used to populate a UI. | [optional] +**metadata** | [**V1beta1PipelineTaskMetadata**](V1beta1PipelineTaskMetadata.md) | | [optional] +**params** | [**list[V1beta1ParamSpec]**](V1beta1ParamSpec.md) | Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. | [optional] +**resources** | [**V1beta1TaskResources**](V1beta1TaskResources.md) | | [optional] +**results** | [**list[V1beta1TaskResult]**](V1beta1TaskResult.md) | Results are values that this Task can output | [optional] +**sidecars** | [**list[V1beta1Sidecar]**](V1beta1Sidecar.md) | Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. | [optional] +**step_template** | [**V1Container**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Container.md) | | [optional] +**steps** | [**list[V1beta1Step]**](V1beta1Step.md) | Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. | [optional] +**volumes** | [**list[V1Volume]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md) | Volumes is a collection of volumes that are available to mount into the steps of the build. | [optional] +**workspaces** | [**list[V1beta1WorkspaceDeclaration]**](V1beta1WorkspaceDeclaration.md) | Workspaces are the volumes that this Task requires. | [optional] + +[[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/sdk/python/docs/V1beta1InternalTaskModifier.md b/sdk/python/docs/V1beta1InternalTaskModifier.md new file mode 100644 index 000000000..4951e021b --- /dev/null +++ b/sdk/python/docs/V1beta1InternalTaskModifier.md @@ -0,0 +1,13 @@ +# V1beta1InternalTaskModifier + +InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**steps_to_append** | [**list[V1beta1Step]**](V1beta1Step.md) | | +**steps_to_prepend** | [**list[V1beta1Step]**](V1beta1Step.md) | | +**volumes** | [**list[V1Volume]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md) | | + +[[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/sdk/python/docs/V1beta1Param.md b/sdk/python/docs/V1beta1Param.md new file mode 100644 index 000000000..039b4ba70 --- /dev/null +++ b/sdk/python/docs/V1beta1Param.md @@ -0,0 +1,12 @@ +# V1beta1Param + +Param declares an ArrayOrString to use for the parameter called name. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | [**V1beta1ArrayOrString**](V1beta1ArrayOrString.md) | | + +[[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/sdk/python/docs/V1beta1ParamSpec.md b/sdk/python/docs/V1beta1ParamSpec.md new file mode 100644 index 000000000..3a83c044a --- /dev/null +++ b/sdk/python/docs/V1beta1ParamSpec.md @@ -0,0 +1,14 @@ +# V1beta1ParamSpec + +ParamSpec defines arbitrary parameters needed beyond typed inputs (such as resources). Parameter values are provided by users as inputs on a TaskRun or PipelineRun. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default** | [**V1beta1ArrayOrString**](V1beta1ArrayOrString.md) | | [optional] +**description** | **str** | Description is a user-facing description of the parameter that may be used to populate a UI. | [optional] +**name** | **str** | Name declares the name by which a parameter is referenced. | +**type** | **str** | Type is the user-specified type of the parameter. The possible types are currently \"string\" and \"array\", and \"string\" is the default. | [optional] + +[[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/sdk/python/docs/V1beta1Pipeline.md b/sdk/python/docs/V1beta1Pipeline.md new file mode 100644 index 000000000..275eb408b --- /dev/null +++ b/sdk/python/docs/V1beta1Pipeline.md @@ -0,0 +1,14 @@ +# V1beta1Pipeline + +Pipeline describes a list of Tasks to execute. It expresses how outputs of tasks feed into inputs of subsequent tasks. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1PipelineSpec**](V1beta1PipelineSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineDeclaredResource.md b/sdk/python/docs/V1beta1PipelineDeclaredResource.md new file mode 100644 index 000000000..2e3e1bbbc --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineDeclaredResource.md @@ -0,0 +1,13 @@ +# V1beta1PipelineDeclaredResource + +PipelineDeclaredResource is used by a Pipeline to declare the types of the PipelineResources that it will required to run and names which can be used to refer to these PipelineResources in PipelineTaskResourceBindings. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the name that will be used by the Pipeline to refer to this resource. It does not directly correspond to the name of any PipelineResources Task inputs or outputs, and it does not correspond to the actual names of the PipelineResources that will be bound in the PipelineRun. | +**optional** | **bool** | Optional declares the resource as optional. optional: true - the resource is considered optional optional: false - the resource is considered required (default/equivalent of not specifying it) | [optional] +**type** | **str** | Type is the type of the PipelineResource. | + +[[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/sdk/python/docs/V1beta1PipelineList.md b/sdk/python/docs/V1beta1PipelineList.md new file mode 100644 index 000000000..638730b81 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineList.md @@ -0,0 +1,14 @@ +# V1beta1PipelineList + +PipelineList contains a list of Pipeline +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1beta1Pipeline]**](V1beta1Pipeline.md) | | +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRef.md b/sdk/python/docs/V1beta1PipelineRef.md new file mode 100644 index 000000000..82ff95816 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRef.md @@ -0,0 +1,13 @@ +# V1beta1PipelineRef + +PipelineRef can be used to refer to a specific instance of a Pipeline. Copied from CrossVersionObjectReference: https://github.com/kubernetes/kubernetes/blob/169df7434155cbbc22f1532cba8e0a9588e29ad8/pkg/apis/autoscaling/types.go#L64 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | API version of the referent | [optional] +**bundle** | **str** | Bundle url reference to a Tekton Bundle. | [optional] +**name** | **str** | Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names | [optional] + +[[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/sdk/python/docs/V1beta1PipelineResourceBinding.md b/sdk/python/docs/V1beta1PipelineResourceBinding.md new file mode 100644 index 000000000..539b49d3c --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineResourceBinding.md @@ -0,0 +1,13 @@ +# V1beta1PipelineResourceBinding + +PipelineResourceBinding connects a reference to an instance of a PipelineResource with a PipelineResource dependency that the Pipeline has declared +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the name of the PipelineResource in the Pipeline's declaration | [optional] +**resource_ref** | [**V1beta1PipelineResourceRef**](V1beta1PipelineResourceRef.md) | | [optional] +**resource_spec** | [**V1alpha1PipelineResourceSpec**](V1alpha1PipelineResourceSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineResourceRef.md b/sdk/python/docs/V1beta1PipelineResourceRef.md new file mode 100644 index 000000000..bca5ca324 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineResourceRef.md @@ -0,0 +1,12 @@ +# V1beta1PipelineResourceRef + +PipelineResourceRef can be used to refer to a specific instance of a Resource +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | API version of the referent | [optional] +**name** | **str** | Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names | [optional] + +[[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/sdk/python/docs/V1beta1PipelineResourceResult.md b/sdk/python/docs/V1beta1PipelineResourceResult.md new file mode 100644 index 000000000..d09aa14ec --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineResourceResult.md @@ -0,0 +1,15 @@ +# V1beta1PipelineResourceResult + +PipelineResourceResult used to export the image name and digest as json +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | | +**resource_name** | **str** | | [optional] +**resource_ref** | [**V1beta1PipelineResourceRef**](V1beta1PipelineResourceRef.md) | | [optional] +**type** | **str** | | [optional] +**value** | **str** | | + +[[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/sdk/python/docs/V1beta1PipelineResult.md b/sdk/python/docs/V1beta1PipelineResult.md new file mode 100644 index 000000000..a98495cf3 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineResult.md @@ -0,0 +1,13 @@ +# V1beta1PipelineResult + +PipelineResult used to describe the results of a pipeline +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a human-readable description of the result | [optional] +**name** | **str** | Name the given name | +**value** | **str** | Value the expression used to retrieve the value | + +[[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/sdk/python/docs/V1beta1PipelineRun.md b/sdk/python/docs/V1beta1PipelineRun.md new file mode 100644 index 000000000..df8c6c7ac --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRun.md @@ -0,0 +1,15 @@ +# V1beta1PipelineRun + +PipelineRun represents a single execution of a Pipeline. PipelineRuns are how the graph of Tasks declared in a Pipeline are executed; they specify inputs to Pipelines such as parameter values and capture operational aspects of the Tasks execution such as service account and tolerations. Creating a PipelineRun creates TaskRuns for Tasks in the referenced Pipeline. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1PipelineRunSpec**](V1beta1PipelineRunSpec.md) | | [optional] +**status** | [**V1beta1PipelineRunStatus**](V1beta1PipelineRunStatus.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunConditionCheckStatus.md b/sdk/python/docs/V1beta1PipelineRunConditionCheckStatus.md new file mode 100644 index 000000000..caa111988 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunConditionCheckStatus.md @@ -0,0 +1,12 @@ +# V1beta1PipelineRunConditionCheckStatus + +PipelineRunConditionCheckStatus returns the condition check status +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition_name** | **str** | ConditionName is the name of the Condition | [optional] +**status** | [**V1beta1ConditionCheckStatus**](V1beta1ConditionCheckStatus.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunList.md b/sdk/python/docs/V1beta1PipelineRunList.md new file mode 100644 index 000000000..58238aa72 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunList.md @@ -0,0 +1,14 @@ +# V1beta1PipelineRunList + +PipelineRunList contains a list of PipelineRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1beta1PipelineRun]**](V1beta1PipelineRun.md) | | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunResult.md b/sdk/python/docs/V1beta1PipelineRunResult.md new file mode 100644 index 000000000..ea9063762 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunResult.md @@ -0,0 +1,12 @@ +# V1beta1PipelineRunResult + +PipelineRunResult used to describe the results of a pipeline +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the result's name as declared by the Pipeline | +**value** | **str** | Value is the result returned from the execution of this PipelineRun | + +[[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/sdk/python/docs/V1beta1PipelineRunSpec.md b/sdk/python/docs/V1beta1PipelineRunSpec.md new file mode 100644 index 000000000..b0be56795 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunSpec.md @@ -0,0 +1,21 @@ +# V1beta1PipelineRunSpec + +PipelineRunSpec defines the desired state of PipelineRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[V1beta1Param]**](V1beta1Param.md) | Params is a list of parameter names and values. | [optional] +**pipeline_ref** | [**V1beta1PipelineRef**](V1beta1PipelineRef.md) | | [optional] +**pipeline_spec** | [**V1beta1PipelineSpec**](V1beta1PipelineSpec.md) | | [optional] +**pod_template** | [**PodTemplate**](PodTemplate.md) | | [optional] +**resources** | [**list[V1beta1PipelineResourceBinding]**](V1beta1PipelineResourceBinding.md) | Resources is a list of bindings specifying which actual instances of PipelineResources to use for the resources the Pipeline has declared it needs. | [optional] +**service_account_name** | **str** | | [optional] +**service_account_names** | [**list[V1beta1PipelineRunSpecServiceAccountName]**](V1beta1PipelineRunSpecServiceAccountName.md) | Deprecated: use taskRunSpecs.ServiceAccountName instead | [optional] +**status** | **str** | Used for cancelling a pipelinerun (and maybe more later on) | [optional] +**task_run_specs** | [**list[V1beta1PipelineTaskRunSpec]**](V1beta1PipelineTaskRunSpec.md) | TaskRunSpecs holds a set of runtime specs | [optional] +**timeout** | [**V1Duration**](V1Duration.md) | | [optional] +**workspaces** | [**list[V1beta1WorkspaceBinding]**](V1beta1WorkspaceBinding.md) | Workspaces holds a set of workspace bindings that must match names with those declared in the pipeline. | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunSpecServiceAccountName.md b/sdk/python/docs/V1beta1PipelineRunSpecServiceAccountName.md new file mode 100644 index 000000000..dfaeaf829 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunSpecServiceAccountName.md @@ -0,0 +1,12 @@ +# V1beta1PipelineRunSpecServiceAccountName + +PipelineRunSpecServiceAccountName can be used to configure specific ServiceAccountName for a concrete Task +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**service_account_name** | **str** | | [optional] +**task_name** | **str** | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunStatus.md b/sdk/python/docs/V1beta1PipelineRunStatus.md new file mode 100644 index 000000000..a2eff4736 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunStatus.md @@ -0,0 +1,19 @@ +# V1beta1PipelineRunStatus + +PipelineRunStatus defines the observed state of PipelineRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**annotations** | **dict(str, str)** | Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. | [optional] +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**conditions** | [**list[KnativeCondition]**](KnativeCondition.md) | Conditions the latest available observations of a resource's current state. | [optional] +**observed_generation** | **int** | ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. | [optional] +**pipeline_results** | [**list[V1beta1PipelineRunResult]**](V1beta1PipelineRunResult.md) | PipelineResults are the list of results written out by the pipeline task's containers | [optional] +**pipeline_spec** | [**V1beta1PipelineSpec**](V1beta1PipelineSpec.md) | | [optional] +**skipped_tasks** | [**list[V1beta1SkippedTask]**](V1beta1SkippedTask.md) | list of tasks that were skipped due to when expressions evaluating to false | [optional] +**start_time** | [**V1Time**](V1Time.md) | | [optional] +**task_runs** | [**dict(str, V1beta1PipelineRunTaskRunStatus)**](V1beta1PipelineRunTaskRunStatus.md) | map of PipelineRunTaskRunStatus with the taskRun name as the key | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunStatusFields.md b/sdk/python/docs/V1beta1PipelineRunStatusFields.md new file mode 100644 index 000000000..53357407b --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunStatusFields.md @@ -0,0 +1,16 @@ +# V1beta1PipelineRunStatusFields + +PipelineRunStatusFields holds the fields of PipelineRunStatus' status. This is defined separately and inlined so that other types can readily consume these fields via duck typing. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**pipeline_results** | [**list[V1beta1PipelineRunResult]**](V1beta1PipelineRunResult.md) | PipelineResults are the list of results written out by the pipeline task's containers | [optional] +**pipeline_spec** | [**V1beta1PipelineSpec**](V1beta1PipelineSpec.md) | | [optional] +**skipped_tasks** | [**list[V1beta1SkippedTask]**](V1beta1SkippedTask.md) | list of tasks that were skipped due to when expressions evaluating to false | [optional] +**start_time** | [**V1Time**](V1Time.md) | | [optional] +**task_runs** | [**dict(str, V1beta1PipelineRunTaskRunStatus)**](V1beta1PipelineRunTaskRunStatus.md) | map of PipelineRunTaskRunStatus with the taskRun name as the key | [optional] + +[[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/sdk/python/docs/V1beta1PipelineRunTaskRunStatus.md b/sdk/python/docs/V1beta1PipelineRunTaskRunStatus.md new file mode 100644 index 000000000..8a0799ebf --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineRunTaskRunStatus.md @@ -0,0 +1,14 @@ +# V1beta1PipelineRunTaskRunStatus + +PipelineRunTaskRunStatus contains the name of the PipelineTask for this TaskRun and the TaskRun's Status +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition_checks** | [**dict(str, V1beta1PipelineRunConditionCheckStatus)**](V1beta1PipelineRunConditionCheckStatus.md) | ConditionChecks maps the name of a condition check to its Status | [optional] +**pipeline_task_name** | **str** | PipelineTaskName is the name of the PipelineTask. | [optional] +**status** | [**V1beta1TaskRunStatus**](V1beta1TaskRunStatus.md) | | [optional] +**when_expressions** | [**list[V1beta1WhenExpression]**](V1beta1WhenExpression.md) | WhenExpressions is the list of checks guarding the execution of the PipelineTask | [optional] + +[[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/sdk/python/docs/V1beta1PipelineSpec.md b/sdk/python/docs/V1beta1PipelineSpec.md new file mode 100644 index 000000000..e37ac8e1e --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineSpec.md @@ -0,0 +1,17 @@ +# V1beta1PipelineSpec + +PipelineSpec defines the desired state of Pipeline. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the pipeline that may be used to populate a UI. | [optional] +**_finally** | [**list[V1beta1PipelineTask]**](V1beta1PipelineTask.md) | Finally declares the list of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline | [optional] +**params** | [**list[V1beta1ParamSpec]**](V1beta1ParamSpec.md) | Params declares a list of input parameters that must be supplied when this Pipeline is run. | [optional] +**resources** | [**list[V1beta1PipelineDeclaredResource]**](V1beta1PipelineDeclaredResource.md) | Resources declares the names and types of the resources given to the Pipeline's tasks as inputs and outputs. | [optional] +**results** | [**list[V1beta1PipelineResult]**](V1beta1PipelineResult.md) | Results are values that this pipeline can output once run | [optional] +**tasks** | [**list[V1beta1PipelineTask]**](V1beta1PipelineTask.md) | Tasks declares the graph of Tasks that execute when this Pipeline is run. | [optional] +**workspaces** | [**list[V1beta1PipelineWorkspaceDeclaration]**](V1beta1PipelineWorkspaceDeclaration.md) | Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun. | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTask.md b/sdk/python/docs/V1beta1PipelineTask.md new file mode 100644 index 000000000..debd9eaf4 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTask.md @@ -0,0 +1,21 @@ +# V1beta1PipelineTask + +PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**list[V1beta1PipelineTaskCondition]**](V1beta1PipelineTaskCondition.md) | Conditions is a list of conditions that need to be true for the task to run Conditions are deprecated, use WhenExpressions instead | [optional] +**name** | **str** | Name is the name of this task within the context of a Pipeline. Name is used as a coordinate with the `from` and `runAfter` fields to establish the execution order of tasks relative to one another. | [optional] +**params** | [**list[V1beta1Param]**](V1beta1Param.md) | Parameters declares parameters passed to this task. | [optional] +**resources** | [**V1beta1PipelineTaskResources**](V1beta1PipelineTaskResources.md) | | [optional] +**retries** | **int** | Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False | [optional] +**run_after** | **list[str]** | RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.) | [optional] +**task_ref** | [**V1beta1TaskRef**](V1beta1TaskRef.md) | | [optional] +**task_spec** | [**V1beta1EmbeddedTask**](V1beta1EmbeddedTask.md) | | [optional] +**timeout** | [**V1Duration**](V1Duration.md) | | [optional] +**when** | [**list[V1beta1WhenExpression]**](V1beta1WhenExpression.md) | WhenExpressions is a list of when expressions that need to be true for the task to run | [optional] +**workspaces** | [**list[V1beta1WorkspacePipelineTaskBinding]**](V1beta1WorkspacePipelineTaskBinding.md) | Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task. | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTaskCondition.md b/sdk/python/docs/V1beta1PipelineTaskCondition.md new file mode 100644 index 000000000..c22b1f989 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskCondition.md @@ -0,0 +1,13 @@ +# V1beta1PipelineTaskCondition + +PipelineTaskCondition allows a PipelineTask to declare a Condition to be evaluated before the Task is run. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition_ref** | **str** | ConditionRef is the name of the Condition to use for the conditionCheck | +**params** | [**list[V1beta1Param]**](V1beta1Param.md) | Params declare parameters passed to this Condition | [optional] +**resources** | [**list[V1beta1PipelineTaskInputResource]**](V1beta1PipelineTaskInputResource.md) | Resources declare the resources provided to this Condition as input | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTaskInputResource.md b/sdk/python/docs/V1beta1PipelineTaskInputResource.md new file mode 100644 index 000000000..4201d368d --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskInputResource.md @@ -0,0 +1,13 @@ +# V1beta1PipelineTaskInputResource + +PipelineTaskInputResource maps the name of a declared PipelineResource input dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used. This input may come from a previous task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **list[str]** | From is the list of PipelineTask names that the resource has to come from. (Implies an ordering in the execution graph.) | [optional] +**name** | **str** | Name is the name of the PipelineResource as declared by the Task. | +**resource** | **str** | Resource is the name of the DeclaredPipelineResource to use. | + +[[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/sdk/python/docs/V1beta1PipelineTaskMetadata.md b/sdk/python/docs/V1beta1PipelineTaskMetadata.md new file mode 100644 index 000000000..95fbf09e4 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskMetadata.md @@ -0,0 +1,11 @@ +# V1beta1PipelineTaskMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**annotations** | **dict(str, str)** | | [optional] +**labels** | **dict(str, str)** | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTaskOutputResource.md b/sdk/python/docs/V1beta1PipelineTaskOutputResource.md new file mode 100644 index 000000000..1396a712b --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskOutputResource.md @@ -0,0 +1,12 @@ +# V1beta1PipelineTaskOutputResource + +PipelineTaskOutputResource maps the name of a declared PipelineResource output dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the name of the PipelineResource as declared by the Task. | +**resource** | **str** | Resource is the name of the DeclaredPipelineResource to use. | + +[[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/sdk/python/docs/V1beta1PipelineTaskParam.md b/sdk/python/docs/V1beta1PipelineTaskParam.md new file mode 100644 index 000000000..208169e91 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskParam.md @@ -0,0 +1,12 @@ +# V1beta1PipelineTaskParam + +PipelineTaskParam is used to provide arbitrary string parameters to a Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**value** | **str** | | + +[[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/sdk/python/docs/V1beta1PipelineTaskResources.md b/sdk/python/docs/V1beta1PipelineTaskResources.md new file mode 100644 index 000000000..cbe4e976c --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskResources.md @@ -0,0 +1,12 @@ +# V1beta1PipelineTaskResources + +PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inputs** | [**list[V1beta1PipelineTaskInputResource]**](V1beta1PipelineTaskInputResource.md) | Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. | [optional] +**outputs** | [**list[V1beta1PipelineTaskOutputResource]**](V1beta1PipelineTaskOutputResource.md) | Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTaskRun.md b/sdk/python/docs/V1beta1PipelineTaskRun.md new file mode 100644 index 000000000..2c61e5a21 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskRun.md @@ -0,0 +1,11 @@ +# V1beta1PipelineTaskRun + +PipelineTaskRun reports the results of running a step in the Task. Each task has the potential to succeed or fail (based on the exit code) and produces logs. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineTaskRunSpec.md b/sdk/python/docs/V1beta1PipelineTaskRunSpec.md new file mode 100644 index 000000000..2f53e8d1c --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineTaskRunSpec.md @@ -0,0 +1,13 @@ +# V1beta1PipelineTaskRunSpec + +PipelineTaskRunSpec can be used to configure specific specs for a concrete Task +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline_task_name** | **str** | | [optional] +**task_pod_template** | [**PodTemplate**](PodTemplate.md) | | [optional] +**task_service_account_name** | **str** | | [optional] + +[[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/sdk/python/docs/V1beta1PipelineWorkspaceDeclaration.md b/sdk/python/docs/V1beta1PipelineWorkspaceDeclaration.md new file mode 100644 index 000000000..5bbfee148 --- /dev/null +++ b/sdk/python/docs/V1beta1PipelineWorkspaceDeclaration.md @@ -0,0 +1,13 @@ +# V1beta1PipelineWorkspaceDeclaration + +WorkspacePipelineDeclaration creates a named slot in a Pipeline that a PipelineRun is expected to populate with a workspace binding. Deprecated: use PipelineWorkspaceDeclaration type instead +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a human readable string describing how the workspace will be used in the Pipeline. It can be useful to include a bit of detail about which tasks are intended to have access to the data on the workspace. | [optional] +**name** | **str** | Name is the name of a workspace to be provided by a PipelineRun. | +**optional** | **bool** | Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required. | [optional] + +[[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/sdk/python/docs/V1beta1ResultRef.md b/sdk/python/docs/V1beta1ResultRef.md new file mode 100644 index 000000000..22fbc1b7e --- /dev/null +++ b/sdk/python/docs/V1beta1ResultRef.md @@ -0,0 +1,12 @@ +# V1beta1ResultRef + +ResultRef is a type that represents a reference to a task run result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pipeline_task** | **str** | | +**result** | **str** | | + +[[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/sdk/python/docs/V1beta1Sidecar.md b/sdk/python/docs/V1beta1Sidecar.md new file mode 100644 index 000000000..95a5ae166 --- /dev/null +++ b/sdk/python/docs/V1beta1Sidecar.md @@ -0,0 +1,33 @@ +# V1beta1Sidecar + +Sidecar has nearly the same data structure as Step, consisting of a Container and an optional Script, but does not have the ability to timeout. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**args** | **list[str]** | Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | [optional] +**command** | **list[str]** | Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | [optional] +**env** | [**list[V1EnvVar]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1EnvVar.md) | List of environment variables to set in the container. Cannot be updated. | [optional] +**env_from** | [**list[V1EnvFromSource]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1EnvFromSource.md) | List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. | [optional] +**image** | **str** | Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. | [optional] +**image_pull_policy** | **str** | Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images | [optional] +**lifecycle** | [**V1Lifecycle**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Lifecycle.md) | | [optional] +**liveness_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**name** | **str** | Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. | +**ports** | [**list[V1ContainerPort]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerPort.md) | List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. | [optional] +**readiness_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**resources** | [**V1ResourceRequirements**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ResourceRequirements.md) | | [optional] +**script** | **str** | Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command or Args. | [optional] +**security_context** | [**V1SecurityContext**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1SecurityContext.md) | | [optional] +**startup_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**stdin** | **bool** | Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. | [optional] +**stdin_once** | **bool** | Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false | [optional] +**termination_message_path** | **str** | Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. | [optional] +**termination_message_policy** | **str** | Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. | [optional] +**tty** | **bool** | Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. | [optional] +**volume_devices** | [**list[V1VolumeDevice]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1VolumeDevice.md) | volumeDevices is the list of block devices to be used by the container. | [optional] +**volume_mounts** | [**list[V1VolumeMount]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1VolumeMount.md) | Pod volumes to mount into the container's filesystem. Cannot be updated. | [optional] +**working_dir** | **str** | Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. | [optional] + +[[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/sdk/python/docs/V1beta1SidecarState.md b/sdk/python/docs/V1beta1SidecarState.md new file mode 100644 index 000000000..01ce3c52d --- /dev/null +++ b/sdk/python/docs/V1beta1SidecarState.md @@ -0,0 +1,16 @@ +# V1beta1SidecarState + +SidecarState reports the results of running a sidecar in a Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**container** | **str** | | [optional] +**image_id** | **str** | | [optional] +**name** | **str** | | [optional] +**running** | [**V1ContainerStateRunning**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateRunning.md) | | [optional] +**terminated** | [**V1ContainerStateTerminated**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateTerminated.md) | | [optional] +**waiting** | [**V1ContainerStateWaiting**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateWaiting.md) | | [optional] + +[[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/sdk/python/docs/V1beta1SkippedTask.md b/sdk/python/docs/V1beta1SkippedTask.md new file mode 100644 index 000000000..246816c1a --- /dev/null +++ b/sdk/python/docs/V1beta1SkippedTask.md @@ -0,0 +1,12 @@ +# V1beta1SkippedTask + +SkippedTask is used to describe the Tasks that were skipped due to their When Expressions evaluating to False. This is a struct because we are looking into including more details about the When Expressions that caused this Task to be skipped. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the Pipeline Task name | +**when_expressions** | [**list[V1beta1WhenExpression]**](V1beta1WhenExpression.md) | WhenExpressions is the list of checks guarding the execution of the PipelineTask | [optional] + +[[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/sdk/python/docs/V1beta1Step.md b/sdk/python/docs/V1beta1Step.md new file mode 100644 index 000000000..3794e9fec --- /dev/null +++ b/sdk/python/docs/V1beta1Step.md @@ -0,0 +1,34 @@ +# V1beta1Step + +Step embeds the Container type, which allows it to include fields not provided by Container. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**args** | **list[str]** | Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | [optional] +**command** | **list[str]** | Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell | [optional] +**env** | [**list[V1EnvVar]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1EnvVar.md) | List of environment variables to set in the container. Cannot be updated. | [optional] +**env_from** | [**list[V1EnvFromSource]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1EnvFromSource.md) | List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. | [optional] +**image** | **str** | Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. | [optional] +**image_pull_policy** | **str** | Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images | [optional] +**lifecycle** | [**V1Lifecycle**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Lifecycle.md) | | [optional] +**liveness_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**name** | **str** | Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. | +**ports** | [**list[V1ContainerPort]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerPort.md) | List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. | [optional] +**readiness_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**resources** | [**V1ResourceRequirements**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ResourceRequirements.md) | | [optional] +**script** | **str** | Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command and the Args will be passed to the Script. | [optional] +**security_context** | [**V1SecurityContext**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1SecurityContext.md) | | [optional] +**startup_probe** | [**V1Probe**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Probe.md) | | [optional] +**stdin** | **bool** | Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. | [optional] +**stdin_once** | **bool** | Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false | [optional] +**termination_message_path** | **str** | Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. | [optional] +**termination_message_policy** | **str** | Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. | [optional] +**timeout** | [**V1Duration**](V1Duration.md) | | [optional] +**tty** | **bool** | Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. | [optional] +**volume_devices** | [**list[V1VolumeDevice]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1VolumeDevice.md) | volumeDevices is the list of block devices to be used by the container. | [optional] +**volume_mounts** | [**list[V1VolumeMount]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1VolumeMount.md) | Pod volumes to mount into the container's filesystem. Cannot be updated. | [optional] +**working_dir** | **str** | Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. | [optional] + +[[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/sdk/python/docs/V1beta1StepState.md b/sdk/python/docs/V1beta1StepState.md new file mode 100644 index 000000000..4c4dd270d --- /dev/null +++ b/sdk/python/docs/V1beta1StepState.md @@ -0,0 +1,16 @@ +# V1beta1StepState + +StepState reports the results of running a step in a Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**container** | **str** | | [optional] +**image_id** | **str** | | [optional] +**name** | **str** | | [optional] +**running** | [**V1ContainerStateRunning**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateRunning.md) | | [optional] +**terminated** | [**V1ContainerStateTerminated**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateTerminated.md) | | [optional] +**waiting** | [**V1ContainerStateWaiting**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ContainerStateWaiting.md) | | [optional] + +[[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/sdk/python/docs/V1beta1Task.md b/sdk/python/docs/V1beta1Task.md new file mode 100644 index 000000000..585e9b504 --- /dev/null +++ b/sdk/python/docs/V1beta1Task.md @@ -0,0 +1,14 @@ +# V1beta1Task + +Task represents a collection of sequential steps that are run as part of a Pipeline using a set of inputs and producing a set of outputs. Tasks execute when TaskRuns are created that provide the input parameters and resources and output resources the Task requires. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1TaskSpec**](V1beta1TaskSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskList.md b/sdk/python/docs/V1beta1TaskList.md new file mode 100644 index 000000000..d7365b76a --- /dev/null +++ b/sdk/python/docs/V1beta1TaskList.md @@ -0,0 +1,14 @@ +# V1beta1TaskList + +TaskList contains a list of Task +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1beta1Task]**](V1beta1Task.md) | | +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRef.md b/sdk/python/docs/V1beta1TaskRef.md new file mode 100644 index 000000000..deb542942 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRef.md @@ -0,0 +1,14 @@ +# V1beta1TaskRef + +TaskRef can be used to refer to a specific instance of a task. Copied from CrossVersionObjectReference: https://github.com/kubernetes/kubernetes/blob/169df7434155cbbc22f1532cba8e0a9588e29ad8/pkg/apis/autoscaling/types.go#L64 +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | API version of the referent | [optional] +**bundle** | **str** | Bundle url reference to a Tekton Bundle. | [optional] +**kind** | **str** | TaskKind indicates the kind of the task, namespaced or cluster scoped. | [optional] +**name** | **str** | Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names | [optional] + +[[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/sdk/python/docs/V1beta1TaskResource.md b/sdk/python/docs/V1beta1TaskResource.md new file mode 100644 index 000000000..acbd9c14b --- /dev/null +++ b/sdk/python/docs/V1beta1TaskResource.md @@ -0,0 +1,15 @@ +# V1beta1TaskResource + +TaskResource defines an input or output Resource declared as a requirement by a Task. The Name field will be used to refer to these Resources within the Task definition, and when provided as an Input, the Name will be the path to the volume mounted containing this Resource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the declared resource that may be used to populate a UI. | [optional] +**name** | **str** | Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. | +**optional** | **bool** | Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) | [optional] +**target_path** | **str** | TargetPath is the path in workspace directory where the resource will be copied. | [optional] +**type** | **str** | Type is the type of this resource; | + +[[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/sdk/python/docs/V1beta1TaskResourceBinding.md b/sdk/python/docs/V1beta1TaskResourceBinding.md new file mode 100644 index 000000000..b1f809f17 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskResourceBinding.md @@ -0,0 +1,14 @@ +# V1beta1TaskResourceBinding + +TaskResourceBinding points to the PipelineResource that will be used for the Task input or output called Name. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the name of the PipelineResource in the Pipeline's declaration | [optional] +**paths** | **list[str]** | Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource). | [optional] +**resource_ref** | [**V1beta1PipelineResourceRef**](V1beta1PipelineResourceRef.md) | | [optional] +**resource_spec** | [**V1alpha1PipelineResourceSpec**](V1alpha1PipelineResourceSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskResources.md b/sdk/python/docs/V1beta1TaskResources.md new file mode 100644 index 000000000..d70a27743 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskResources.md @@ -0,0 +1,12 @@ +# V1beta1TaskResources + +TaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inputs** | [**list[V1beta1TaskResource]**](V1beta1TaskResource.md) | Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. | [optional] +**outputs** | [**list[V1beta1TaskResource]**](V1beta1TaskResource.md) | Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. | [optional] + +[[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/sdk/python/docs/V1beta1TaskResult.md b/sdk/python/docs/V1beta1TaskResult.md new file mode 100644 index 000000000..d2f704105 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskResult.md @@ -0,0 +1,12 @@ +# V1beta1TaskResult + +TaskResult used to describe the results of a task +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a human-readable description of the result | [optional] +**name** | **str** | Name the given name | + +[[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/sdk/python/docs/V1beta1TaskRun.md b/sdk/python/docs/V1beta1TaskRun.md new file mode 100644 index 000000000..e0e62701a --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRun.md @@ -0,0 +1,15 @@ +# V1beta1TaskRun + +TaskRun represents a single execution of a Task. TaskRuns are how the steps specified in a Task are executed; they specify the parameters and resources used to run the steps in a Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] +**spec** | [**V1beta1TaskRunSpec**](V1beta1TaskRunSpec.md) | | [optional] +**status** | [**V1beta1TaskRunStatus**](V1beta1TaskRunStatus.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunInputs.md b/sdk/python/docs/V1beta1TaskRunInputs.md new file mode 100644 index 000000000..1afbcc1dd --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunInputs.md @@ -0,0 +1,12 @@ +# V1beta1TaskRunInputs + +TaskRunInputs holds the input values that this task was invoked with. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[V1beta1Param]**](V1beta1Param.md) | | [optional] +**resources** | [**list[V1beta1TaskResourceBinding]**](V1beta1TaskResourceBinding.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunList.md b/sdk/python/docs/V1beta1TaskRunList.md new file mode 100644 index 000000000..de486f048 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunList.md @@ -0,0 +1,14 @@ +# V1beta1TaskRunList + +TaskRunList contains a list of TaskRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | 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 | [optional] +**items** | [**list[V1beta1TaskRun]**](V1beta1TaskRun.md) | | +**kind** | **str** | 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 | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunOutputs.md b/sdk/python/docs/V1beta1TaskRunOutputs.md new file mode 100644 index 000000000..92a3502f0 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunOutputs.md @@ -0,0 +1,11 @@ +# V1beta1TaskRunOutputs + +TaskRunOutputs holds the output values that this task was invoked with. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resources** | [**list[V1beta1TaskResourceBinding]**](V1beta1TaskResourceBinding.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunResources.md b/sdk/python/docs/V1beta1TaskRunResources.md new file mode 100644 index 000000000..82f0a2b64 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunResources.md @@ -0,0 +1,12 @@ +# V1beta1TaskRunResources + +TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inputs** | [**list[V1beta1TaskResourceBinding]**](V1beta1TaskResourceBinding.md) | Inputs holds the inputs resources this task was invoked with | [optional] +**outputs** | [**list[V1beta1TaskResourceBinding]**](V1beta1TaskResourceBinding.md) | Outputs holds the inputs resources this task was invoked with | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunResult.md b/sdk/python/docs/V1beta1TaskRunResult.md new file mode 100644 index 000000000..0f78ef62e --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunResult.md @@ -0,0 +1,12 @@ +# V1beta1TaskRunResult + +TaskRunResult used to describe the results of a task +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name the given name | +**value** | **str** | Value the given value of the result | + +[[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/sdk/python/docs/V1beta1TaskRunSpec.md b/sdk/python/docs/V1beta1TaskRunSpec.md new file mode 100644 index 000000000..988eac59d --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunSpec.md @@ -0,0 +1,19 @@ +# V1beta1TaskRunSpec + +TaskRunSpec defines the desired state of TaskRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**params** | [**list[V1beta1Param]**](V1beta1Param.md) | | [optional] +**pod_template** | [**PodTemplate**](PodTemplate.md) | | [optional] +**resources** | [**V1beta1TaskRunResources**](V1beta1TaskRunResources.md) | | [optional] +**service_account_name** | **str** | | [optional] +**status** | **str** | Used for cancelling a taskrun (and maybe more later on) | [optional] +**task_ref** | [**V1beta1TaskRef**](V1beta1TaskRef.md) | | [optional] +**task_spec** | [**V1beta1TaskSpec**](V1beta1TaskSpec.md) | | [optional] +**timeout** | [**V1Duration**](V1Duration.md) | | [optional] +**workspaces** | [**list[V1beta1WorkspaceBinding]**](V1beta1WorkspaceBinding.md) | Workspaces is a list of WorkspaceBindings from volumes to workspaces. | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunStatus.md b/sdk/python/docs/V1beta1TaskRunStatus.md new file mode 100644 index 000000000..2d9e409b8 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunStatus.md @@ -0,0 +1,23 @@ +# V1beta1TaskRunStatus + +TaskRunStatus defines the observed state of TaskRun +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**annotations** | **dict(str, str)** | Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. | [optional] +**cloud_events** | [**list[V1beta1CloudEventDelivery]**](V1beta1CloudEventDelivery.md) | CloudEvents describe the state of each cloud event requested via a CloudEventResource. | [optional] +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**conditions** | [**list[KnativeCondition]**](KnativeCondition.md) | Conditions the latest available observations of a resource's current state. | [optional] +**observed_generation** | **int** | ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. | [optional] +**pod_name** | **str** | PodName is the name of the pod responsible for executing this task's steps. | +**resources_result** | [**list[V1beta1PipelineResourceResult]**](V1beta1PipelineResourceResult.md) | Results from Resources built during the taskRun. currently includes the digest of build container images | [optional] +**retries_status** | [**list[V1beta1TaskRunStatus]**](V1beta1TaskRunStatus.md) | RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. | [optional] +**sidecars** | [**list[V1beta1SidecarState]**](V1beta1SidecarState.md) | The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. | [optional] +**start_time** | [**V1Time**](V1Time.md) | | [optional] +**steps** | [**list[V1beta1StepState]**](V1beta1StepState.md) | Steps describes the state of each build step container. | [optional] +**task_results** | [**list[V1beta1TaskRunResult]**](V1beta1TaskRunResult.md) | TaskRunResults are the list of results written out by the task's containers | [optional] +**task_spec** | [**V1beta1TaskSpec**](V1beta1TaskSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskRunStatusFields.md b/sdk/python/docs/V1beta1TaskRunStatusFields.md new file mode 100644 index 000000000..7bbd40549 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskRunStatusFields.md @@ -0,0 +1,20 @@ +# V1beta1TaskRunStatusFields + +TaskRunStatusFields holds the fields of TaskRun's status. This is defined separately and inlined so that other types can readily consume these fields via duck typing. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cloud_events** | [**list[V1beta1CloudEventDelivery]**](V1beta1CloudEventDelivery.md) | CloudEvents describe the state of each cloud event requested via a CloudEventResource. | [optional] +**completion_time** | [**V1Time**](V1Time.md) | | [optional] +**pod_name** | **str** | PodName is the name of the pod responsible for executing this task's steps. | +**resources_result** | [**list[V1beta1PipelineResourceResult]**](V1beta1PipelineResourceResult.md) | Results from Resources built during the taskRun. currently includes the digest of build container images | [optional] +**retries_status** | [**list[V1beta1TaskRunStatus]**](V1beta1TaskRunStatus.md) | RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. | [optional] +**sidecars** | [**list[V1beta1SidecarState]**](V1beta1SidecarState.md) | The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. | [optional] +**start_time** | [**V1Time**](V1Time.md) | | [optional] +**steps** | [**list[V1beta1StepState]**](V1beta1StepState.md) | Steps describes the state of each build step container. | [optional] +**task_results** | [**list[V1beta1TaskRunResult]**](V1beta1TaskRunResult.md) | TaskRunResults are the list of results written out by the task's containers | [optional] +**task_spec** | [**V1beta1TaskSpec**](V1beta1TaskSpec.md) | | [optional] + +[[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/sdk/python/docs/V1beta1TaskSpec.md b/sdk/python/docs/V1beta1TaskSpec.md new file mode 100644 index 000000000..ea71291a8 --- /dev/null +++ b/sdk/python/docs/V1beta1TaskSpec.md @@ -0,0 +1,19 @@ +# V1beta1TaskSpec + +TaskSpec defines the desired state of Task. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is a user-facing description of the task that may be used to populate a UI. | [optional] +**params** | [**list[V1beta1ParamSpec]**](V1beta1ParamSpec.md) | Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. | [optional] +**resources** | [**V1beta1TaskResources**](V1beta1TaskResources.md) | | [optional] +**results** | [**list[V1beta1TaskResult]**](V1beta1TaskResult.md) | Results are values that this Task can output | [optional] +**sidecars** | [**list[V1beta1Sidecar]**](V1beta1Sidecar.md) | Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. | [optional] +**step_template** | [**V1Container**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Container.md) | | [optional] +**steps** | [**list[V1beta1Step]**](V1beta1Step.md) | Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. | [optional] +**volumes** | [**list[V1Volume]**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Volume.md) | Volumes is a collection of volumes that are available to mount into the steps of the build. | [optional] +**workspaces** | [**list[V1beta1WorkspaceDeclaration]**](V1beta1WorkspaceDeclaration.md) | Workspaces are the volumes that this Task requires. | [optional] + +[[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/sdk/python/docs/V1beta1WhenExpression.md b/sdk/python/docs/V1beta1WhenExpression.md new file mode 100644 index 000000000..9eeece822 --- /dev/null +++ b/sdk/python/docs/V1beta1WhenExpression.md @@ -0,0 +1,16 @@ +# V1beta1WhenExpression + +WhenExpression allows a PipelineTask to declare expressions to be evaluated before the Task is run to determine whether the Task should be executed or skipped +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**input** | **str** | DeprecatedInput for backwards compatibility with <v0.17 it is the string for guard checking which can be a static input or an output from a parent Task | [optional] +**operator** | **str** | DeprecatedOperator for backwards compatibility with <v0.17 it represents a DeprecatedInput's relationship to the DeprecatedValues | [optional] +**values** | **list[str]** | DeprecatedValues for backwards compatibility with <v0.17 it represents a DeprecatedInput's relationship to the DeprecatedValues | [optional] +**input** | **str** | Input is the string for guard checking which can be a static input or an output from a parent Task | +**operator** | **str** | Operator that represents an Input's relationship to the values | +**values** | **list[str]** | Values is an array of strings, which is compared against the input, for guard checking It must be non-empty | + +[[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/sdk/python/docs/V1beta1WorkspaceBinding.md b/sdk/python/docs/V1beta1WorkspaceBinding.md new file mode 100644 index 000000000..94633a487 --- /dev/null +++ b/sdk/python/docs/V1beta1WorkspaceBinding.md @@ -0,0 +1,17 @@ +# V1beta1WorkspaceBinding + +WorkspaceBinding maps a Task's declared workspace to a Volume. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_map** | [**V1ConfigMapVolumeSource**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ConfigMapVolumeSource.md) | | [optional] +**empty_dir** | [**V1EmptyDirVolumeSource**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1EmptyDirVolumeSource.md) | | [optional] +**name** | **str** | Name is the name of the workspace populated by the volume. | +**persistent_volume_claim** | [**V1PersistentVolumeClaimVolumeSource**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PersistentVolumeClaimVolumeSource.md) | | [optional] +**secret** | [**V1SecretVolumeSource**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1SecretVolumeSource.md) | | [optional] +**sub_path** | **str** | SubPath is optionally a directory on the volume which should be used for this binding (i.e. the volume will be mounted at this sub directory). | [optional] +**volume_claim_template** | [**V1PersistentVolumeClaim**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1PersistentVolumeClaim.md) | | [optional] + +[[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/sdk/python/docs/V1beta1WorkspaceDeclaration.md b/sdk/python/docs/V1beta1WorkspaceDeclaration.md new file mode 100644 index 000000000..d5acb40d0 --- /dev/null +++ b/sdk/python/docs/V1beta1WorkspaceDeclaration.md @@ -0,0 +1,15 @@ +# V1beta1WorkspaceDeclaration + +WorkspaceDeclaration is a declaration of a volume that a Task requires. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description is an optional human readable description of this volume. | [optional] +**mount_path** | **str** | MountPath overrides the directory that the volume will be made available at. | [optional] +**name** | **str** | Name is the name by which you can bind the volume at runtime. | +**optional** | **bool** | Optional marks a Workspace as not being required in TaskRuns. By default this field is false and so declared workspaces are required. | [optional] +**read_only** | **bool** | ReadOnly dictates whether a mounted volume is writable. By default this field is false and so mounted volumes are writable. | [optional] + +[[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/sdk/python/docs/V1beta1WorkspacePipelineTaskBinding.md b/sdk/python/docs/V1beta1WorkspacePipelineTaskBinding.md new file mode 100644 index 000000000..87c25b873 --- /dev/null +++ b/sdk/python/docs/V1beta1WorkspacePipelineTaskBinding.md @@ -0,0 +1,13 @@ +# V1beta1WorkspacePipelineTaskBinding + +WorkspacePipelineTaskBinding describes how a workspace passed into the pipeline should be mapped to a task's declared workspace. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name is the name of the workspace as declared by the task | +**sub_path** | **str** | SubPath is optionally a directory on the volume which should be used for this binding (i.e. the volume will be mounted at this sub directory). | [optional] +**workspace** | **str** | Workspace is the name of the workspace declared by the pipeline | + +[[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/sdk/python/examples/taskrun.ipynb b/sdk/python/examples/taskrun.ipynb new file mode 100644 index 000000000..4e24898d2 --- /dev/null +++ b/sdk/python/examples/taskrun.ipynb @@ -0,0 +1,272 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Sample for Tekton Pipeline Python SDK" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This is a sample for Tekton Pipeline Python SDK.\n", + "\n", + "The notebook shows how to use Tekton Pipeline Python SDK to create, get and delete TaskRun." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Ensure the Tekton Pipeline Python SDK is installed\n", + "\n", + "The Python SDK already published in https://pypi.org/project/tekton-pipeline/" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Name: tekton-pipeline\r\n", + "Version: 0.0.4\r\n", + "Summary: Tekton Pipeline Python SDK\r\n", + "Home-page: https://github.com/tektoncd/pipeline.git\r\n", + "Author: Tekton Authors\r\n", + "Author-email: hejinchi@cn.ibm.com\r\n", + "License: Apache License Version 2.0\r\n", + "Location: /opt/python/python36/lib/python3.6/site-packages\r\n", + "Requires: six, python-dateutil, setuptools, certifi, urllib3\r\n", + "Required-by: \r\n" + ] + } + ], + "source": [ + "!pip show tekton-pipeline" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "from kubernetes import client\n", + "\n", + "from tekton import TektonClient\n", + "from tekton import V1beta1TaskRun\n", + "from tekton import V1beta1TaskRunSpec\n", + "from tekton import V1beta1TaskSpec\n", + "from tekton import V1beta1Step" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Instantiate a Tekton Python Client" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "tekton_client = TektonClient()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Define a TaskRun" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "taskrun = V1beta1TaskRun(\n", + " api_version='tekton.dev/v1beta1',\n", + " kind='TaskRun',\n", + " metadata=client.V1ObjectMeta(name='sdk-sample-taskrun'),\n", + " spec=V1beta1TaskRunSpec(\n", + " task_spec=V1beta1TaskSpec(\n", + " steps=[V1beta1Step(name='default',\n", + " image='ubuntu',\n", + " script='sleep 30;echo \"This is a sdk demo.')]\n", + " )))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create a TaskRun" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'apiVersion': 'tekton.dev/v1beta1',\n", + " 'kind': 'TaskRun',\n", + " 'metadata': {'creationTimestamp': '2020-08-10T10:10:06Z',\n", + " 'generation': 1,\n", + " 'labels': {'app.kubernetes.io/managed-by': 'tekton-pipelines'},\n", + " 'name': 'sdk-sample-taskrun',\n", + " 'namespace': 'default',\n", + " 'resourceVersion': '109797271',\n", + " 'selfLink': '/apis/tekton.dev/v1beta1/namespaces/default/taskruns/sdk-sample-taskrun',\n", + " 'uid': '99a36a20-5a1b-4f03-9fee-4869e659a141'},\n", + " 'spec': {'serviceAccountName': '',\n", + " 'taskSpec': {'steps': [{'image': 'ubuntu',\n", + " 'name': 'default',\n", + " 'resources': {},\n", + " 'script': 'sleep 30;echo \"This is a sdk demo.'}]},\n", + " 'timeout': '1h0m0s'}}" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tekton_client.create(taskrun, namespace='default')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Get the create TaskRun" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'apiVersion': 'tekton.dev/v1beta1',\n", + " 'kind': 'TaskRun',\n", + " 'metadata': {'annotations': {'pipeline.tekton.dev/release': 'devel'},\n", + " 'creationTimestamp': '2020-08-10T10:10:06Z',\n", + " 'generation': 1,\n", + " 'labels': {'app.kubernetes.io/managed-by': 'tekton-pipelines'},\n", + " 'name': 'sdk-sample-taskrun',\n", + " 'namespace': 'default',\n", + " 'resourceVersion': '109797303',\n", + " 'selfLink': '/apis/tekton.dev/v1beta1/namespaces/default/taskruns/sdk-sample-taskrun',\n", + " 'uid': '99a36a20-5a1b-4f03-9fee-4869e659a141'},\n", + " 'spec': {'serviceAccountName': '',\n", + " 'taskSpec': {'steps': [{'image': 'ubuntu',\n", + " 'name': 'default',\n", + " 'resources': {},\n", + " 'script': 'sleep 30;echo \"This is a sdk demo.'}]},\n", + " 'timeout': '1h0m0s'},\n", + " 'status': {'conditions': [{'lastTransitionTime': '2020-08-10T10:10:08Z',\n", + " 'message': 'pod status \"Initialized\":\"False\"; message: \"containers with incomplete status: [place-tools]\"',\n", + " 'reason': 'Pending',\n", + " 'status': 'Unknown',\n", + " 'type': 'Succeeded'}],\n", + " 'podName': 'sdk-sample-taskrun-pod-qgnzd',\n", + " 'startTime': '2020-08-10T10:10:06Z',\n", + " 'steps': [{'container': 'step-default',\n", + " 'name': 'default',\n", + " 'waiting': {'reason': 'PodInitializing'}}],\n", + " 'taskSpec': {'steps': [{'image': 'ubuntu',\n", + " 'name': 'default',\n", + " 'resources': {},\n", + " 'script': 'sleep 30;echo \"This is a sdk demo.'}]}}}" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tekton_client.get(name='sdk-sample-taskrun', plural='taskruns', namespace='default')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Delete a TaskRun" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'kind': 'Status',\n", + " 'apiVersion': 'v1',\n", + " 'metadata': {},\n", + " 'status': 'Success',\n", + " 'details': {'name': 'sdk-sample-taskrun',\n", + " 'group': 'tekton.dev',\n", + " 'kind': 'taskruns',\n", + " 'uid': '99a36a20-5a1b-4f03-9fee-4869e659a141'}}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tekton_client.delete(name='sdk-sample-taskrun', plural='taskruns', namespace='default')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.9" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/sdk/python/requirements.txt b/sdk/python/requirements.txt new file mode 100644 index 000000000..3b8ca5a93 --- /dev/null +++ b/sdk/python/requirements.txt @@ -0,0 +1,8 @@ +certifi >= 14.05.14 +future; python_version<="2.7" +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 +kubernetes>=12.0.0 + diff --git a/sdk/python/setup.cfg b/sdk/python/setup.cfg new file mode 100644 index 000000000..11433ee87 --- /dev/null +++ b/sdk/python/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/sdk/python/setup.py b/sdk/python/setup.py new file mode 100644 index 000000000..8dc494282 --- /dev/null +++ b/sdk/python/setup.py @@ -0,0 +1,62 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import setuptools + +TESTS_REQUIRES = [ + 'pytest', + 'pytest-tornasync', + 'mypy' +] + +with open('requirements.txt') as f: + REQUIRES = f.readlines() + +setuptools.setup( + name='tekton-pipeline', + version='0.1.0', + author="Tekton Authors", + author_email='hejinchi@cn.ibm.com', + license="Apache License Version 2.0", + url="https://github.com/tektoncd/pipeline.git", + description="Tekton Pipeline Python SDK", + long_description="Python SDK for Tekton Pipeline.", + packages=[ + 'tekton', + 'tekton.api', + 'tekton.constants', + 'tekton.models', + 'tekton.utils', + ], + package_data={'': ['requirements.txt']}, + include_package_data=True, + zip_safe=False, + classifiers=[ + 'Intended Audience :: Developers', + 'Intended Audience :: Education', + 'Intended Audience :: Science/Research', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 3', + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + 'Topic :: Scientific/Engineering', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + 'Topic :: Software Development', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules', + ], + install_requires=REQUIRES, + tests_require=TESTS_REQUIRES, + extras_require={'test': TESTS_REQUIRES} +) diff --git a/sdk/python/tekton/__init__.py b/sdk/python/tekton/__init__.py new file mode 100644 index 000000000..004becfd9 --- /dev/null +++ b/sdk/python/tekton/__init__.py @@ -0,0 +1,121 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +# flake8: noqa + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "0.1" + +# import apis into sdk package + +# import ApiClient +from tekton.api_client import ApiClient +from tekton.configuration import Configuration +from tekton.exceptions import OpenApiException +from tekton.exceptions import ApiTypeError +from tekton.exceptions import ApiValueError +from tekton.exceptions import ApiKeyError +from tekton.exceptions import ApiException +# import models into sdk package +from tekton.models.pod_template import PodTemplate +from tekton.models.v1alpha1_pipeline_resource import V1alpha1PipelineResource +from tekton.models.v1alpha1_pipeline_resource_list import V1alpha1PipelineResourceList +from tekton.models.v1alpha1_pipeline_resource_spec import V1alpha1PipelineResourceSpec +from tekton.models.v1alpha1_resource_declaration import V1alpha1ResourceDeclaration +from tekton.models.v1alpha1_resource_param import V1alpha1ResourceParam +from tekton.models.v1alpha1_secret_param import V1alpha1SecretParam +from tekton.models.v1beta1_array_or_string import V1beta1ArrayOrString +from tekton.models.v1beta1_cannot_convert_error import V1beta1CannotConvertError +from tekton.models.v1beta1_cloud_event_delivery import V1beta1CloudEventDelivery +from tekton.models.v1beta1_cloud_event_delivery_state import V1beta1CloudEventDeliveryState +from tekton.models.v1beta1_cluster_task import V1beta1ClusterTask +from tekton.models.v1beta1_cluster_task_list import V1beta1ClusterTaskList +from tekton.models.v1beta1_condition_check import V1beta1ConditionCheck +from tekton.models.v1beta1_condition_check_status import V1beta1ConditionCheckStatus +from tekton.models.v1beta1_condition_check_status_fields import V1beta1ConditionCheckStatusFields +from tekton.models.v1beta1_embedded_task import V1beta1EmbeddedTask +from tekton.models.v1beta1_internal_task_modifier import V1beta1InternalTaskModifier +from tekton.models.v1beta1_param import V1beta1Param +from tekton.models.v1beta1_param_spec import V1beta1ParamSpec +from tekton.models.v1beta1_pipeline import V1beta1Pipeline +from tekton.models.v1beta1_pipeline_declared_resource import V1beta1PipelineDeclaredResource +from tekton.models.v1beta1_pipeline_list import V1beta1PipelineList +from tekton.models.v1beta1_pipeline_ref import V1beta1PipelineRef +from tekton.models.v1beta1_pipeline_resource_binding import V1beta1PipelineResourceBinding +from tekton.models.v1beta1_pipeline_resource_ref import V1beta1PipelineResourceRef +from tekton.models.v1beta1_pipeline_resource_result import V1beta1PipelineResourceResult +from tekton.models.v1beta1_pipeline_result import V1beta1PipelineResult +from tekton.models.v1beta1_pipeline_run import V1beta1PipelineRun +from tekton.models.v1beta1_pipeline_run_condition_check_status import V1beta1PipelineRunConditionCheckStatus +from tekton.models.v1beta1_pipeline_run_list import V1beta1PipelineRunList +from tekton.models.v1beta1_pipeline_run_result import V1beta1PipelineRunResult +from tekton.models.v1beta1_pipeline_run_spec import V1beta1PipelineRunSpec +from tekton.models.v1beta1_pipeline_run_spec_service_account_name import V1beta1PipelineRunSpecServiceAccountName +from tekton.models.v1beta1_pipeline_run_status import V1beta1PipelineRunStatus +from tekton.models.v1beta1_pipeline_run_status_fields import V1beta1PipelineRunStatusFields +from tekton.models.v1beta1_pipeline_run_task_run_status import V1beta1PipelineRunTaskRunStatus +from tekton.models.v1beta1_pipeline_spec import V1beta1PipelineSpec +from tekton.models.v1beta1_pipeline_task import V1beta1PipelineTask +from tekton.models.v1beta1_pipeline_task_condition import V1beta1PipelineTaskCondition +from tekton.models.v1beta1_pipeline_task_input_resource import V1beta1PipelineTaskInputResource +from tekton.models.v1beta1_pipeline_task_metadata import V1beta1PipelineTaskMetadata +from tekton.models.v1beta1_pipeline_task_output_resource import V1beta1PipelineTaskOutputResource +from tekton.models.v1beta1_pipeline_task_param import V1beta1PipelineTaskParam +from tekton.models.v1beta1_pipeline_task_resources import V1beta1PipelineTaskResources +from tekton.models.v1beta1_pipeline_task_run import V1beta1PipelineTaskRun +from tekton.models.v1beta1_pipeline_task_run_spec import V1beta1PipelineTaskRunSpec +from tekton.models.v1beta1_pipeline_workspace_declaration import V1beta1PipelineWorkspaceDeclaration +from tekton.models.v1beta1_result_ref import V1beta1ResultRef +from tekton.models.v1beta1_sidecar import V1beta1Sidecar +from tekton.models.v1beta1_sidecar_state import V1beta1SidecarState +from tekton.models.v1beta1_skipped_task import V1beta1SkippedTask +from tekton.models.v1beta1_step import V1beta1Step +from tekton.models.v1beta1_step_state import V1beta1StepState +from tekton.models.v1beta1_task import V1beta1Task +from tekton.models.v1beta1_task_list import V1beta1TaskList +from tekton.models.v1beta1_task_ref import V1beta1TaskRef +from tekton.models.v1beta1_task_resource import V1beta1TaskResource +from tekton.models.v1beta1_task_resource_binding import V1beta1TaskResourceBinding +from tekton.models.v1beta1_task_resources import V1beta1TaskResources +from tekton.models.v1beta1_task_result import V1beta1TaskResult +from tekton.models.v1beta1_task_run import V1beta1TaskRun +from tekton.models.v1beta1_task_run_inputs import V1beta1TaskRunInputs +from tekton.models.v1beta1_task_run_list import V1beta1TaskRunList +from tekton.models.v1beta1_task_run_outputs import V1beta1TaskRunOutputs +from tekton.models.v1beta1_task_run_resources import V1beta1TaskRunResources +from tekton.models.v1beta1_task_run_result import V1beta1TaskRunResult +from tekton.models.v1beta1_task_run_spec import V1beta1TaskRunSpec +from tekton.models.v1beta1_task_run_status import V1beta1TaskRunStatus +from tekton.models.v1beta1_task_run_status_fields import V1beta1TaskRunStatusFields +from tekton.models.v1beta1_task_spec import V1beta1TaskSpec +from tekton.models.v1beta1_when_expression import V1beta1WhenExpression +from tekton.models.v1beta1_workspace_binding import V1beta1WorkspaceBinding +from tekton.models.v1beta1_workspace_declaration import V1beta1WorkspaceDeclaration +from tekton.models.v1beta1_workspace_pipeline_task_binding import V1beta1WorkspacePipelineTaskBinding + +from tekton.api.tekton_client import TektonClient +from tekton.constants import constants diff --git a/sdk/python/tekton/api/__init__.py b/sdk/python/tekton/api/__init__.py new file mode 100644 index 000000000..463d3c214 --- /dev/null +++ b/sdk/python/tekton/api/__init__.py @@ -0,0 +1,19 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package diff --git a/sdk/python/tekton/api/tekton_client.py b/sdk/python/tekton/api/tekton_client.py new file mode 100644 index 000000000..bfb1b0bcb --- /dev/null +++ b/sdk/python/tekton/api/tekton_client.py @@ -0,0 +1,122 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import time +from kubernetes import client, config + +from ..constants import constants +from ..utils import utils + + +class TektonClient(object): + + def __init__(self, config_file=None, context=None, + client_configuration=None, persist_config=True): + """ + Tekton client constructor + :param config_file: kubeconfig file, defaults to ~/.kube/config + :param context: kubernetes context + :param client_configuration: kubernetes configuration object + :param persist_config: + """ + if config_file or not utils.is_running_in_k8s(): + config.load_kube_config( + config_file=config_file, + context=context, + client_configuration=client_configuration, + persist_config=persist_config) + else: + config.load_incluster_config() + self.core_api = client.CoreV1Api() + self.app_api = client.AppsV1Api() + self.api_instance = client.CustomObjectsApi() + + def create(self, tekton, plural=None, namespace=None): + """ + Create the Tekton objects + :param tekton: Tekton objects + :param plural: the custom object's plural name. + :param namespace: defaults to current or default namespace + :return: created Tekton objects + """ + + if namespace is None: + namespace = utils.get_tekton_namespace(tekton) + + if plural is None: + plural = utils.get_tekton_plural(tekton) + + try: + outputs = self.api_instance.create_namespaced_custom_object( + constants.TEKTON_GROUP, + constants.TEKTON_VERSION, + namespace, + plural, + tekton) + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->create_namespaced_custom_object:\ + %s\n" % e) + + return outputs + + def get(self, name, plural, namespace=None): + """ + Get the Tekton objects + :param name: existing Tekton objects + :param plural: the custom object's plural name. + :param namespace: defaults to current or default namespace + :return: Tekton objects + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + try: + return self.api_instance.get_namespaced_custom_object( + constants.TEKTON_GROUP, + constants.TEKTON_VERSION, + namespace, + plural, + name) + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->get_namespaced_custom_object:\ + %s\n" % e) + + + def delete(self, name, plural, namespace=None): + """ + Delete the Tekton objects + :param name: Tekton object's name + :param plural: the custom object's plural name. + :param namespace: defaults to current or default namespace + :return: + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + try: + return self.api_instance.delete_namespaced_custom_object( + constants.TEKTON_GROUP, + constants.TEKTON_VERSION, + namespace, + plural, + name, + client.V1DeleteOptions()) + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->delete_namespaced_custom_object:\ + %s\n" % e) diff --git a/sdk/python/tekton/api_client.py b/sdk/python/tekton/api_client.py new file mode 100644 index 000000000..967a42cba --- /dev/null +++ b/sdk/python/tekton/api_client.py @@ -0,0 +1,680 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from tekton.configuration import Configuration +import tekton.models +from tekton import rest +from tekton.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/0.1/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(tekton.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :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. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True + + if not klass.openapi_types and has_discriminator is False: + return data + + kwargs = {} + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if has_discriminator: + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/sdk/python/tekton/configuration.py b/sdk/python/tekton/configuration.py new file mode 100644 index 000000000..160a6c9f0 --- /dev/null +++ b/sdk/python/tekton/configuration.py @@ -0,0 +1,390 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + """ + + _default = None + + def __init__(self, host="http://localhost", + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("tekton") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v0.17.2\n"\ + "SDK Package Version: 0.1".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/sdk/python/tekton/constants/__init__.py b/sdk/python/tekton/constants/__init__.py new file mode 100644 index 000000000..438bd09d1 --- /dev/null +++ b/sdk/python/tekton/constants/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/sdk/python/tekton/constants/constants.py b/sdk/python/tekton/constants/constants.py new file mode 100644 index 000000000..5e5b8bae2 --- /dev/null +++ b/sdk/python/tekton/constants/constants.py @@ -0,0 +1,20 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import os + +TEKTON_GROUP = 'tekton.dev' +TEKTON_VERSION = os.environ.get('TEKTON_VERSION', 'v1beta1') +TEKTON_API_VERSION = TEKTON_GROUP + '/' + TEKTON_VERSION + +TEKTON_LOGLEVEL = os.environ.get('TEKTON_LOGLEVEL', 'INFO').upper() diff --git a/sdk/python/tekton/exceptions.py b/sdk/python/tekton/exceptions.py new file mode 100644 index 000000000..73bb68279 --- /dev/null +++ b/sdk/python/tekton/exceptions.py @@ -0,0 +1,134 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/tekton/models/__init__.py b/sdk/python/tekton/models/__init__.py new file mode 100644 index 000000000..4eb34806e --- /dev/null +++ b/sdk/python/tekton/models/__init__.py @@ -0,0 +1,105 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +# flake8: noqa +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from tekton.models.pod_template import PodTemplate +from tekton.models.v1alpha1_pipeline_resource import V1alpha1PipelineResource +from tekton.models.v1alpha1_pipeline_resource_list import V1alpha1PipelineResourceList +from tekton.models.v1alpha1_pipeline_resource_spec import V1alpha1PipelineResourceSpec +from tekton.models.v1alpha1_resource_declaration import V1alpha1ResourceDeclaration +from tekton.models.v1alpha1_resource_param import V1alpha1ResourceParam +from tekton.models.v1alpha1_secret_param import V1alpha1SecretParam +from tekton.models.v1beta1_array_or_string import V1beta1ArrayOrString +from tekton.models.v1beta1_cannot_convert_error import V1beta1CannotConvertError +from tekton.models.v1beta1_cloud_event_delivery import V1beta1CloudEventDelivery +from tekton.models.v1beta1_cloud_event_delivery_state import V1beta1CloudEventDeliveryState +from tekton.models.v1beta1_cluster_task import V1beta1ClusterTask +from tekton.models.v1beta1_cluster_task_list import V1beta1ClusterTaskList +from tekton.models.v1beta1_condition_check import V1beta1ConditionCheck +from tekton.models.v1beta1_condition_check_status import V1beta1ConditionCheckStatus +from tekton.models.v1beta1_condition_check_status_fields import V1beta1ConditionCheckStatusFields +from tekton.models.v1beta1_embedded_task import V1beta1EmbeddedTask +from tekton.models.v1beta1_internal_task_modifier import V1beta1InternalTaskModifier +from tekton.models.v1beta1_param import V1beta1Param +from tekton.models.v1beta1_param_spec import V1beta1ParamSpec +from tekton.models.v1beta1_pipeline import V1beta1Pipeline +from tekton.models.v1beta1_pipeline_declared_resource import V1beta1PipelineDeclaredResource +from tekton.models.v1beta1_pipeline_list import V1beta1PipelineList +from tekton.models.v1beta1_pipeline_ref import V1beta1PipelineRef +from tekton.models.v1beta1_pipeline_resource_binding import V1beta1PipelineResourceBinding +from tekton.models.v1beta1_pipeline_resource_ref import V1beta1PipelineResourceRef +from tekton.models.v1beta1_pipeline_resource_result import V1beta1PipelineResourceResult +from tekton.models.v1beta1_pipeline_result import V1beta1PipelineResult +from tekton.models.v1beta1_pipeline_run import V1beta1PipelineRun +from tekton.models.v1beta1_pipeline_run_condition_check_status import V1beta1PipelineRunConditionCheckStatus +from tekton.models.v1beta1_pipeline_run_list import V1beta1PipelineRunList +from tekton.models.v1beta1_pipeline_run_result import V1beta1PipelineRunResult +from tekton.models.v1beta1_pipeline_run_spec import V1beta1PipelineRunSpec +from tekton.models.v1beta1_pipeline_run_spec_service_account_name import V1beta1PipelineRunSpecServiceAccountName +from tekton.models.v1beta1_pipeline_run_status import V1beta1PipelineRunStatus +from tekton.models.v1beta1_pipeline_run_status_fields import V1beta1PipelineRunStatusFields +from tekton.models.v1beta1_pipeline_run_task_run_status import V1beta1PipelineRunTaskRunStatus +from tekton.models.v1beta1_pipeline_spec import V1beta1PipelineSpec +from tekton.models.v1beta1_pipeline_task import V1beta1PipelineTask +from tekton.models.v1beta1_pipeline_task_condition import V1beta1PipelineTaskCondition +from tekton.models.v1beta1_pipeline_task_input_resource import V1beta1PipelineTaskInputResource +from tekton.models.v1beta1_pipeline_task_metadata import V1beta1PipelineTaskMetadata +from tekton.models.v1beta1_pipeline_task_output_resource import V1beta1PipelineTaskOutputResource +from tekton.models.v1beta1_pipeline_task_param import V1beta1PipelineTaskParam +from tekton.models.v1beta1_pipeline_task_resources import V1beta1PipelineTaskResources +from tekton.models.v1beta1_pipeline_task_run import V1beta1PipelineTaskRun +from tekton.models.v1beta1_pipeline_task_run_spec import V1beta1PipelineTaskRunSpec +from tekton.models.v1beta1_pipeline_workspace_declaration import V1beta1PipelineWorkspaceDeclaration +from tekton.models.v1beta1_result_ref import V1beta1ResultRef +from tekton.models.v1beta1_sidecar import V1beta1Sidecar +from tekton.models.v1beta1_sidecar_state import V1beta1SidecarState +from tekton.models.v1beta1_skipped_task import V1beta1SkippedTask +from tekton.models.v1beta1_step import V1beta1Step +from tekton.models.v1beta1_step_state import V1beta1StepState +from tekton.models.v1beta1_task import V1beta1Task +from tekton.models.v1beta1_task_list import V1beta1TaskList +from tekton.models.v1beta1_task_ref import V1beta1TaskRef +from tekton.models.v1beta1_task_resource import V1beta1TaskResource +from tekton.models.v1beta1_task_resource_binding import V1beta1TaskResourceBinding +from tekton.models.v1beta1_task_resources import V1beta1TaskResources +from tekton.models.v1beta1_task_result import V1beta1TaskResult +from tekton.models.v1beta1_task_run import V1beta1TaskRun +from tekton.models.v1beta1_task_run_inputs import V1beta1TaskRunInputs +from tekton.models.v1beta1_task_run_list import V1beta1TaskRunList +from tekton.models.v1beta1_task_run_outputs import V1beta1TaskRunOutputs +from tekton.models.v1beta1_task_run_resources import V1beta1TaskRunResources +from tekton.models.v1beta1_task_run_result import V1beta1TaskRunResult +from tekton.models.v1beta1_task_run_spec import V1beta1TaskRunSpec +from tekton.models.v1beta1_task_run_status import V1beta1TaskRunStatus +from tekton.models.v1beta1_task_run_status_fields import V1beta1TaskRunStatusFields +from tekton.models.v1beta1_task_spec import V1beta1TaskSpec +from tekton.models.v1beta1_when_expression import V1beta1WhenExpression +from tekton.models.v1beta1_workspace_binding import V1beta1WorkspaceBinding +from tekton.models.v1beta1_workspace_declaration import V1beta1WorkspaceDeclaration +from tekton.models.v1beta1_workspace_pipeline_task_binding import V1beta1WorkspacePipelineTaskBinding diff --git a/sdk/python/tekton/models/knative_condition.py b/sdk/python/tekton/models/knative_condition.py new file mode 100644 index 000000000..d720c48b2 --- /dev/null +++ b/sdk/python/tekton/models/knative_condition.py @@ -0,0 +1,277 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + tekton + + Python SDK for tekton # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.models.knative_volatile_time import KnativeVolatileTime # noqa: F401,E501 + + +class KnativeCondition(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last_transition_time': 'KnativeVolatileTime', + 'message': 'str', + 'reason': 'str', + 'severity': 'str', + 'status': 'str', + 'type': 'str' + } + + attribute_map = { + 'last_transition_time': 'lastTransitionTime', + 'message': 'message', + 'reason': 'reason', + 'severity': 'severity', + 'status': 'status', + 'type': 'type' + } + + def __init__(self, last_transition_time=None, message=None, reason=None, severity=None, status=None, type=None): # noqa: E501 + """KnativeCondition - a model defined in Swagger""" # noqa: E501 + + self._last_transition_time = None + self._message = None + self._reason = None + self._severity = None + self._status = None + self._type = None + self.discriminator = None + + if last_transition_time is not None: + self.last_transition_time = last_transition_time + if message is not None: + self.message = message + if reason is not None: + self.reason = reason + if severity is not None: + self.severity = severity + self.status = status + self.type = type + + @property + def last_transition_time(self): + """Gets the last_transition_time of this KnativeCondition. # noqa: E501 + + LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). # noqa: E501 + + :return: The last_transition_time of this KnativeCondition. # noqa: E501 + :rtype: KnativeVolatileTime + """ + return self._last_transition_time + + @last_transition_time.setter + def last_transition_time(self, last_transition_time): + """Sets the last_transition_time of this KnativeCondition. + + LastTransitionTime is the last time the condition transitioned from one status to another. We use VolatileTime in place of metav1.Time to exclude this from creating equality.Semantic differences (all other things held constant). # noqa: E501 + + :param last_transition_time: The last_transition_time of this KnativeCondition. # noqa: E501 + :type: KnativeVolatileTime + """ + + self._last_transition_time = last_transition_time + + @property + def message(self): + """Gets the message of this KnativeCondition. # noqa: E501 + + A human readable message indicating details about the transition. # noqa: E501 + + :return: The message of this KnativeCondition. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this KnativeCondition. + + A human readable message indicating details about the transition. # noqa: E501 + + :param message: The message of this KnativeCondition. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def reason(self): + """Gets the reason of this KnativeCondition. # noqa: E501 + + The reason for the condition's last transition. # noqa: E501 + + :return: The reason of this KnativeCondition. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this KnativeCondition. + + The reason for the condition's last transition. # noqa: E501 + + :param reason: The reason of this KnativeCondition. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def severity(self): + """Gets the severity of this KnativeCondition. # noqa: E501 + + Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. # noqa: E501 + + :return: The severity of this KnativeCondition. # noqa: E501 + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """Sets the severity of this KnativeCondition. + + Severity with which to treat failures of this type of condition. When this is not specified, it defaults to Error. # noqa: E501 + + :param severity: The severity of this KnativeCondition. # noqa: E501 + :type: str + """ + + self._severity = severity + + @property + def status(self): + """Gets the status of this KnativeCondition. # noqa: E501 + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :return: The status of this KnativeCondition. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this KnativeCondition. + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :param status: The status of this KnativeCondition. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def type(self): + """Gets the type of this KnativeCondition. # noqa: E501 + + Type of condition. # noqa: E501 + + :return: The type of this KnativeCondition. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this KnativeCondition. + + Type of condition. # noqa: E501 + + :param type: The type of this KnativeCondition. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KnativeCondition, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KnativeCondition): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/tekton/models/knative_volatile_time.py b/sdk/python/tekton/models/knative_volatile_time.py new file mode 100644 index 000000000..c3d2e82c4 --- /dev/null +++ b/sdk/python/tekton/models/knative_volatile_time.py @@ -0,0 +1,134 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + tekton + + Python SDK for tekton # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.models.v1_time import V1Time # noqa: F401,E501 + + +class KnativeVolatileTime(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'inner': 'V1Time' + } + + attribute_map = { + 'inner': 'Inner' + } + + def __init__(self, inner=None): # noqa: E501 + """KnativeVolatileTime - a model defined in Swagger""" # noqa: E501 + + self._inner = None + self.discriminator = None + + self.inner = inner + + @property + def inner(self): + """Gets the inner of this KnativeVolatileTime. # noqa: E501 + + + :return: The inner of this KnativeVolatileTime. # noqa: E501 + :rtype: V1Time + """ + return self._inner + + @inner.setter + def inner(self, inner): + """Sets the inner of this KnativeVolatileTime. + + + :param inner: The inner of this KnativeVolatileTime. # noqa: E501 + :type: V1Time + """ + if inner is None: + raise ValueError("Invalid value for `inner`, must not be `None`") # noqa: E501 + + self._inner = inner + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(KnativeVolatileTime, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, KnativeVolatileTime): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/tekton/models/pod_template.py b/sdk/python/tekton/models/pod_template.py new file mode 100644 index 000000000..c40384b12 --- /dev/null +++ b/sdk/python/tekton/models/pod_template.py @@ -0,0 +1,494 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class PodTemplate(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'affinity': 'V1Affinity', + 'automount_service_account_token': 'bool', + 'dns_config': 'V1PodDNSConfig', + 'dns_policy': 'str', + 'enable_service_links': 'bool', + 'host_network': 'bool', + 'image_pull_secrets': 'list[V1LocalObjectReference]', + 'node_selector': 'dict(str, str)', + 'priority_class_name': 'str', + 'runtime_class_name': 'str', + 'scheduler_name': 'str', + 'security_context': 'V1PodSecurityContext', + 'tolerations': 'list[V1Toleration]', + 'volumes': 'list[V1Volume]' + } + + attribute_map = { + 'affinity': 'affinity', + 'automount_service_account_token': 'automountServiceAccountToken', + 'dns_config': 'dnsConfig', + 'dns_policy': 'dnsPolicy', + 'enable_service_links': 'enableServiceLinks', + 'host_network': 'hostNetwork', + 'image_pull_secrets': 'imagePullSecrets', + 'node_selector': 'nodeSelector', + 'priority_class_name': 'priorityClassName', + 'runtime_class_name': 'runtimeClassName', + 'scheduler_name': 'schedulerName', + 'security_context': 'securityContext', + 'tolerations': 'tolerations', + 'volumes': 'volumes' + } + + def __init__(self, affinity=None, automount_service_account_token=None, dns_config=None, dns_policy=None, enable_service_links=None, host_network=None, image_pull_secrets=None, node_selector=None, priority_class_name=None, runtime_class_name=None, scheduler_name=None, security_context=None, tolerations=None, volumes=None, local_vars_configuration=None): # noqa: E501 + """PodTemplate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._affinity = None + self._automount_service_account_token = None + self._dns_config = None + self._dns_policy = None + self._enable_service_links = None + self._host_network = None + self._image_pull_secrets = None + self._node_selector = None + self._priority_class_name = None + self._runtime_class_name = None + self._scheduler_name = None + self._security_context = None + self._tolerations = None + self._volumes = None + self.discriminator = None + + if affinity is not None: + self.affinity = affinity + if automount_service_account_token is not None: + self.automount_service_account_token = automount_service_account_token + if dns_config is not None: + self.dns_config = dns_config + if dns_policy is not None: + self.dns_policy = dns_policy + if enable_service_links is not None: + self.enable_service_links = enable_service_links + if host_network is not None: + self.host_network = host_network + if image_pull_secrets is not None: + self.image_pull_secrets = image_pull_secrets + if node_selector is not None: + self.node_selector = node_selector + if priority_class_name is not None: + self.priority_class_name = priority_class_name + if runtime_class_name is not None: + self.runtime_class_name = runtime_class_name + if scheduler_name is not None: + self.scheduler_name = scheduler_name + if security_context is not None: + self.security_context = security_context + if tolerations is not None: + self.tolerations = tolerations + if volumes is not None: + self.volumes = volumes + + @property + def affinity(self): + """Gets the affinity of this PodTemplate. # noqa: E501 + + + :return: The affinity of this PodTemplate. # noqa: E501 + :rtype: V1Affinity + """ + return self._affinity + + @affinity.setter + def affinity(self, affinity): + """Sets the affinity of this PodTemplate. + + + :param affinity: The affinity of this PodTemplate. # noqa: E501 + :type: V1Affinity + """ + + self._affinity = affinity + + @property + def automount_service_account_token(self): + """Gets the automount_service_account_token of this PodTemplate. # noqa: E501 + + AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. # noqa: E501 + + :return: The automount_service_account_token of this PodTemplate. # noqa: E501 + :rtype: bool + """ + return self._automount_service_account_token + + @automount_service_account_token.setter + def automount_service_account_token(self, automount_service_account_token): + """Sets the automount_service_account_token of this PodTemplate. + + AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. # noqa: E501 + + :param automount_service_account_token: The automount_service_account_token of this PodTemplate. # noqa: E501 + :type: bool + """ + + self._automount_service_account_token = automount_service_account_token + + @property + def dns_config(self): + """Gets the dns_config of this PodTemplate. # noqa: E501 + + + :return: The dns_config of this PodTemplate. # noqa: E501 + :rtype: V1PodDNSConfig + """ + return self._dns_config + + @dns_config.setter + def dns_config(self, dns_config): + """Sets the dns_config of this PodTemplate. + + + :param dns_config: The dns_config of this PodTemplate. # noqa: E501 + :type: V1PodDNSConfig + """ + + self._dns_config = dns_config + + @property + def dns_policy(self): + """Gets the dns_policy of this PodTemplate. # noqa: E501 + + Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. # noqa: E501 + + :return: The dns_policy of this PodTemplate. # noqa: E501 + :rtype: str + """ + return self._dns_policy + + @dns_policy.setter + def dns_policy(self, dns_policy): + """Sets the dns_policy of this PodTemplate. + + Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. # noqa: E501 + + :param dns_policy: The dns_policy of this PodTemplate. # noqa: E501 + :type: str + """ + + self._dns_policy = dns_policy + + @property + def enable_service_links(self): + """Gets the enable_service_links of this PodTemplate. # noqa: E501 + + EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true. # noqa: E501 + + :return: The enable_service_links of this PodTemplate. # noqa: E501 + :rtype: bool + """ + return self._enable_service_links + + @enable_service_links.setter + def enable_service_links(self, enable_service_links): + """Sets the enable_service_links of this PodTemplate. + + EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. Optional: Defaults to true. # noqa: E501 + + :param enable_service_links: The enable_service_links of this PodTemplate. # noqa: E501 + :type: bool + """ + + self._enable_service_links = enable_service_links + + @property + def host_network(self): + """Gets the host_network of this PodTemplate. # noqa: E501 + + HostNetwork specifies whether the pod may use the node network namespace # noqa: E501 + + :return: The host_network of this PodTemplate. # noqa: E501 + :rtype: bool + """ + return self._host_network + + @host_network.setter + def host_network(self, host_network): + """Sets the host_network of this PodTemplate. + + HostNetwork specifies whether the pod may use the node network namespace # noqa: E501 + + :param host_network: The host_network of this PodTemplate. # noqa: E501 + :type: bool + """ + + self._host_network = host_network + + @property + def image_pull_secrets(self): + """Gets the image_pull_secrets of this PodTemplate. # noqa: E501 + + ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified # noqa: E501 + + :return: The image_pull_secrets of this PodTemplate. # noqa: E501 + :rtype: list[V1LocalObjectReference] + """ + return self._image_pull_secrets + + @image_pull_secrets.setter + def image_pull_secrets(self, image_pull_secrets): + """Sets the image_pull_secrets of this PodTemplate. + + ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified # noqa: E501 + + :param image_pull_secrets: The image_pull_secrets of this PodTemplate. # noqa: E501 + :type: list[V1LocalObjectReference] + """ + + self._image_pull_secrets = image_pull_secrets + + @property + def node_selector(self): + """Gets the node_selector of this PodTemplate. # noqa: E501 + + NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # noqa: E501 + + :return: The node_selector of this PodTemplate. # noqa: E501 + :rtype: dict(str, str) + """ + return self._node_selector + + @node_selector.setter + def node_selector(self, node_selector): + """Sets the node_selector of this PodTemplate. + + NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ # noqa: E501 + + :param node_selector: The node_selector of this PodTemplate. # noqa: E501 + :type: dict(str, str) + """ + + self._node_selector = node_selector + + @property + def priority_class_name(self): + """Gets the priority_class_name of this PodTemplate. # noqa: E501 + + If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. # noqa: E501 + + :return: The priority_class_name of this PodTemplate. # noqa: E501 + :rtype: str + """ + return self._priority_class_name + + @priority_class_name.setter + def priority_class_name(self, priority_class_name): + """Sets the priority_class_name of this PodTemplate. + + If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. # noqa: E501 + + :param priority_class_name: The priority_class_name of this PodTemplate. # noqa: E501 + :type: str + """ + + self._priority_class_name = priority_class_name + + @property + def runtime_class_name(self): + """Gets the runtime_class_name of this PodTemplate. # noqa: E501 + + RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14. # noqa: E501 + + :return: The runtime_class_name of this PodTemplate. # noqa: E501 + :rtype: str + """ + return self._runtime_class_name + + @runtime_class_name.setter + def runtime_class_name(self, runtime_class_name): + """Sets the runtime_class_name of this PodTemplate. + + RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14. # noqa: E501 + + :param runtime_class_name: The runtime_class_name of this PodTemplate. # noqa: E501 + :type: str + """ + + self._runtime_class_name = runtime_class_name + + @property + def scheduler_name(self): + """Gets the scheduler_name of this PodTemplate. # noqa: E501 + + SchedulerName specifies the scheduler to be used to dispatch the Pod # noqa: E501 + + :return: The scheduler_name of this PodTemplate. # noqa: E501 + :rtype: str + """ + return self._scheduler_name + + @scheduler_name.setter + def scheduler_name(self, scheduler_name): + """Sets the scheduler_name of this PodTemplate. + + SchedulerName specifies the scheduler to be used to dispatch the Pod # noqa: E501 + + :param scheduler_name: The scheduler_name of this PodTemplate. # noqa: E501 + :type: str + """ + + self._scheduler_name = scheduler_name + + @property + def security_context(self): + """Gets the security_context of this PodTemplate. # noqa: E501 + + + :return: The security_context of this PodTemplate. # noqa: E501 + :rtype: V1PodSecurityContext + """ + return self._security_context + + @security_context.setter + def security_context(self, security_context): + """Sets the security_context of this PodTemplate. + + + :param security_context: The security_context of this PodTemplate. # noqa: E501 + :type: V1PodSecurityContext + """ + + self._security_context = security_context + + @property + def tolerations(self): + """Gets the tolerations of this PodTemplate. # noqa: E501 + + If specified, the pod's tolerations. # noqa: E501 + + :return: The tolerations of this PodTemplate. # noqa: E501 + :rtype: list[V1Toleration] + """ + return self._tolerations + + @tolerations.setter + def tolerations(self, tolerations): + """Sets the tolerations of this PodTemplate. + + If specified, the pod's tolerations. # noqa: E501 + + :param tolerations: The tolerations of this PodTemplate. # noqa: E501 + :type: list[V1Toleration] + """ + + self._tolerations = tolerations + + @property + def volumes(self): + """Gets the volumes of this PodTemplate. # noqa: E501 + + List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes # noqa: E501 + + :return: The volumes of this PodTemplate. # noqa: E501 + :rtype: list[V1Volume] + """ + return self._volumes + + @volumes.setter + def volumes(self, volumes): + """Sets the volumes of this PodTemplate. + + List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes # noqa: E501 + + :param volumes: The volumes of this PodTemplate. # noqa: E501 + :type: list[V1Volume] + """ + + self._volumes = volumes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PodTemplate): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PodTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1_duration.py b/sdk/python/tekton/models/v1_duration.py new file mode 100644 index 000000000..24d8bd568 --- /dev/null +++ b/sdk/python/tekton/models/v1_duration.py @@ -0,0 +1,103 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1Duration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1Duration - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1Duration, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Duration): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/tekton/models/v1_time.py b/sdk/python/tekton/models/v1_time.py new file mode 100644 index 000000000..bd9c9a460 --- /dev/null +++ b/sdk/python/tekton/models/v1_time.py @@ -0,0 +1,103 @@ +#!/usr/bin/env bash + +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1Time(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1Time - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1Time, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Time): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/tekton/models/v1alpha1_pipeline_resource.py b/sdk/python/tekton/models/v1alpha1_pipeline_resource.py new file mode 100644 index 000000000..3ac21ae44 --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_pipeline_resource.py @@ -0,0 +1,244 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1PipelineResource(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1alpha1PipelineResourceSpec', + 'status': 'object' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1PipelineResource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1alpha1PipelineResource. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1alpha1PipelineResource. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1alpha1PipelineResource. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1alpha1PipelineResource. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1alpha1PipelineResource. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1alpha1PipelineResource. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1alpha1PipelineResource. + + 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 # noqa: E501 + + :param kind: The kind of this V1alpha1PipelineResource. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1alpha1PipelineResource. # noqa: E501 + + + :return: The metadata of this V1alpha1PipelineResource. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1alpha1PipelineResource. + + + :param metadata: The metadata of this V1alpha1PipelineResource. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1alpha1PipelineResource. # noqa: E501 + + + :return: The spec of this V1alpha1PipelineResource. # noqa: E501 + :rtype: V1alpha1PipelineResourceSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1alpha1PipelineResource. + + + :param spec: The spec of this V1alpha1PipelineResource. # noqa: E501 + :type: V1alpha1PipelineResourceSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1alpha1PipelineResource. # noqa: E501 + + PipelineResourceStatus does not contain anything because PipelineResources on their own do not have a status Deprecated # noqa: E501 + + :return: The status of this V1alpha1PipelineResource. # noqa: E501 + :rtype: object + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1alpha1PipelineResource. + + PipelineResourceStatus does not contain anything because PipelineResources on their own do not have a status Deprecated # noqa: E501 + + :param status: The status of this V1alpha1PipelineResource. # noqa: E501 + :type: object + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1PipelineResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1PipelineResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1alpha1_pipeline_resource_list.py b/sdk/python/tekton/models/v1alpha1_pipeline_resource_list.py new file mode 100644 index 000000000..9137f0e75 --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_pipeline_resource_list.py @@ -0,0 +1,217 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1PipelineResourceList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1alpha1PipelineResource]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1PipelineResourceList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1alpha1PipelineResourceList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1alpha1PipelineResourceList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1alpha1PipelineResourceList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1alpha1PipelineResourceList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1alpha1PipelineResourceList. # noqa: E501 + + + :return: The items of this V1alpha1PipelineResourceList. # noqa: E501 + :rtype: list[V1alpha1PipelineResource] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1alpha1PipelineResourceList. + + + :param items: The items of this V1alpha1PipelineResourceList. # noqa: E501 + :type: list[V1alpha1PipelineResource] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1alpha1PipelineResourceList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1alpha1PipelineResourceList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1alpha1PipelineResourceList. + + 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 # noqa: E501 + + :param kind: The kind of this V1alpha1PipelineResourceList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1alpha1PipelineResourceList. # noqa: E501 + + + :return: The metadata of this V1alpha1PipelineResourceList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1alpha1PipelineResourceList. + + + :param metadata: The metadata of this V1alpha1PipelineResourceList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1PipelineResourceList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1PipelineResourceList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1alpha1_pipeline_resource_spec.py b/sdk/python/tekton/models/v1alpha1_pipeline_resource_spec.py new file mode 100644 index 000000000..5e9ef943a --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_pipeline_resource_spec.py @@ -0,0 +1,218 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1PipelineResourceSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'params': 'list[V1alpha1ResourceParam]', + 'secrets': 'list[V1alpha1SecretParam]', + 'type': 'str' + } + + attribute_map = { + 'description': 'description', + 'params': 'params', + 'secrets': 'secrets', + 'type': 'type' + } + + def __init__(self, description=None, params=None, secrets=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1PipelineResourceSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._params = None + self._secrets = None + self._type = None + self.discriminator = None + + if description is not None: + self.description = description + self.params = params + if secrets is not None: + self.secrets = secrets + self.type = type + + @property + def description(self): + """Gets the description of this V1alpha1PipelineResourceSpec. # noqa: E501 + + Description is a user-facing description of the resource that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1alpha1PipelineResourceSpec. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1alpha1PipelineResourceSpec. + + Description is a user-facing description of the resource that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1alpha1PipelineResourceSpec. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def params(self): + """Gets the params of this V1alpha1PipelineResourceSpec. # noqa: E501 + + + :return: The params of this V1alpha1PipelineResourceSpec. # noqa: E501 + :rtype: list[V1alpha1ResourceParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1alpha1PipelineResourceSpec. + + + :param params: The params of this V1alpha1PipelineResourceSpec. # noqa: E501 + :type: list[V1alpha1ResourceParam] + """ + if self.local_vars_configuration.client_side_validation and params is None: # noqa: E501 + raise ValueError("Invalid value for `params`, must not be `None`") # noqa: E501 + + self._params = params + + @property + def secrets(self): + """Gets the secrets of this V1alpha1PipelineResourceSpec. # noqa: E501 + + Secrets to fetch to populate some of resource fields # noqa: E501 + + :return: The secrets of this V1alpha1PipelineResourceSpec. # noqa: E501 + :rtype: list[V1alpha1SecretParam] + """ + return self._secrets + + @secrets.setter + def secrets(self, secrets): + """Sets the secrets of this V1alpha1PipelineResourceSpec. + + Secrets to fetch to populate some of resource fields # noqa: E501 + + :param secrets: The secrets of this V1alpha1PipelineResourceSpec. # noqa: E501 + :type: list[V1alpha1SecretParam] + """ + + self._secrets = secrets + + @property + def type(self): + """Gets the type of this V1alpha1PipelineResourceSpec. # noqa: E501 + + + :return: The type of this V1alpha1PipelineResourceSpec. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1alpha1PipelineResourceSpec. + + + :param type: The type of this V1alpha1PipelineResourceSpec. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1PipelineResourceSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1PipelineResourceSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1alpha1_pipeline_resource_status.py b/sdk/python/tekton/models/v1alpha1_pipeline_resource_status.py new file mode 100644 index 000000000..d5d34990f --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_pipeline_resource_status.py @@ -0,0 +1,101 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1alpha1PipelineResourceStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1alpha1PipelineResourceStatus - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1alpha1PipelineResourceStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1PipelineResourceStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/tekton/models/v1alpha1_resource_declaration.py b/sdk/python/tekton/models/v1alpha1_resource_declaration.py new file mode 100644 index 000000000..cc26476a7 --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_resource_declaration.py @@ -0,0 +1,250 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1ResourceDeclaration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'name': 'str', + 'optional': 'bool', + 'target_path': 'str', + 'type': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'optional': 'optional', + 'target_path': 'targetPath', + 'type': 'type' + } + + def __init__(self, description=None, name=None, optional=None, target_path=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1ResourceDeclaration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._name = None + self._optional = None + self._target_path = None + self._type = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + if optional is not None: + self.optional = optional + if target_path is not None: + self.target_path = target_path + self.type = type + + @property + def description(self): + """Gets the description of this V1alpha1ResourceDeclaration. # noqa: E501 + + Description is a user-facing description of the declared resource that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1alpha1ResourceDeclaration. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1alpha1ResourceDeclaration. + + Description is a user-facing description of the declared resource that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1alpha1ResourceDeclaration. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1alpha1ResourceDeclaration. # noqa: E501 + + Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. # noqa: E501 + + :return: The name of this V1alpha1ResourceDeclaration. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1alpha1ResourceDeclaration. + + Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. # noqa: E501 + + :param name: The name of this V1alpha1ResourceDeclaration. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def optional(self): + """Gets the optional of this V1alpha1ResourceDeclaration. # noqa: E501 + + Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) # noqa: E501 + + :return: The optional of this V1alpha1ResourceDeclaration. # noqa: E501 + :rtype: bool + """ + return self._optional + + @optional.setter + def optional(self, optional): + """Sets the optional of this V1alpha1ResourceDeclaration. + + Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) # noqa: E501 + + :param optional: The optional of this V1alpha1ResourceDeclaration. # noqa: E501 + :type: bool + """ + + self._optional = optional + + @property + def target_path(self): + """Gets the target_path of this V1alpha1ResourceDeclaration. # noqa: E501 + + TargetPath is the path in workspace directory where the resource will be copied. # noqa: E501 + + :return: The target_path of this V1alpha1ResourceDeclaration. # noqa: E501 + :rtype: str + """ + return self._target_path + + @target_path.setter + def target_path(self, target_path): + """Sets the target_path of this V1alpha1ResourceDeclaration. + + TargetPath is the path in workspace directory where the resource will be copied. # noqa: E501 + + :param target_path: The target_path of this V1alpha1ResourceDeclaration. # noqa: E501 + :type: str + """ + + self._target_path = target_path + + @property + def type(self): + """Gets the type of this V1alpha1ResourceDeclaration. # noqa: E501 + + Type is the type of this resource; # noqa: E501 + + :return: The type of this V1alpha1ResourceDeclaration. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1alpha1ResourceDeclaration. + + Type is the type of this resource; # noqa: E501 + + :param type: The type of this V1alpha1ResourceDeclaration. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1ResourceDeclaration): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1ResourceDeclaration): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1alpha1_resource_param.py b/sdk/python/tekton/models/v1alpha1_resource_param.py new file mode 100644 index 000000000..9dde6a2b0 --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_resource_param.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1ResourceParam(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1ResourceParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this V1alpha1ResourceParam. # noqa: E501 + + + :return: The name of this V1alpha1ResourceParam. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1alpha1ResourceParam. + + + :param name: The name of this V1alpha1ResourceParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1alpha1ResourceParam. # noqa: E501 + + + :return: The value of this V1alpha1ResourceParam. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1alpha1ResourceParam. + + + :param value: The value of this V1alpha1ResourceParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1ResourceParam): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1ResourceParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1alpha1_secret_param.py b/sdk/python/tekton/models/v1alpha1_secret_param.py new file mode 100644 index 000000000..56e03353c --- /dev/null +++ b/sdk/python/tekton/models/v1alpha1_secret_param.py @@ -0,0 +1,189 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1alpha1SecretParam(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'field_name': 'str', + 'secret_key': 'str', + 'secret_name': 'str' + } + + attribute_map = { + 'field_name': 'fieldName', + 'secret_key': 'secretKey', + 'secret_name': 'secretName' + } + + def __init__(self, field_name=None, secret_key=None, secret_name=None, local_vars_configuration=None): # noqa: E501 + """V1alpha1SecretParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._field_name = None + self._secret_key = None + self._secret_name = None + self.discriminator = None + + self.field_name = field_name + self.secret_key = secret_key + self.secret_name = secret_name + + @property + def field_name(self): + """Gets the field_name of this V1alpha1SecretParam. # noqa: E501 + + + :return: The field_name of this V1alpha1SecretParam. # noqa: E501 + :rtype: str + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """Sets the field_name of this V1alpha1SecretParam. + + + :param field_name: The field_name of this V1alpha1SecretParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field_name is None: # noqa: E501 + raise ValueError("Invalid value for `field_name`, must not be `None`") # noqa: E501 + + self._field_name = field_name + + @property + def secret_key(self): + """Gets the secret_key of this V1alpha1SecretParam. # noqa: E501 + + + :return: The secret_key of this V1alpha1SecretParam. # noqa: E501 + :rtype: str + """ + return self._secret_key + + @secret_key.setter + def secret_key(self, secret_key): + """Sets the secret_key of this V1alpha1SecretParam. + + + :param secret_key: The secret_key of this V1alpha1SecretParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and secret_key is None: # noqa: E501 + raise ValueError("Invalid value for `secret_key`, must not be `None`") # noqa: E501 + + self._secret_key = secret_key + + @property + def secret_name(self): + """Gets the secret_name of this V1alpha1SecretParam. # noqa: E501 + + + :return: The secret_name of this V1alpha1SecretParam. # noqa: E501 + :rtype: str + """ + return self._secret_name + + @secret_name.setter + def secret_name(self, secret_name): + """Sets the secret_name of this V1alpha1SecretParam. + + + :param secret_name: The secret_name of this V1alpha1SecretParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and secret_name is None: # noqa: E501 + raise ValueError("Invalid value for `secret_name`, must not be `None`") # noqa: E501 + + self._secret_name = secret_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1alpha1SecretParam): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1alpha1SecretParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_array_or_string.py b/sdk/python/tekton/models/v1beta1_array_or_string.py new file mode 100644 index 000000000..17ff8d1cb --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_array_or_string.py @@ -0,0 +1,191 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ArrayOrString(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'array_val': 'list[str]', + 'string_val': 'str', + 'type': 'str' + } + + attribute_map = { + 'array_val': 'arrayVal', + 'string_val': 'stringVal', + 'type': 'type' + } + + def __init__(self, array_val=None, string_val=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ArrayOrString - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._array_val = None + self._string_val = None + self._type = None + self.discriminator = None + + self.array_val = array_val + self.string_val = string_val + self.type = type + + @property + def array_val(self): + """Gets the array_val of this V1beta1ArrayOrString. # noqa: E501 + + + :return: The array_val of this V1beta1ArrayOrString. # noqa: E501 + :rtype: list[str] + """ + return self._array_val + + @array_val.setter + def array_val(self, array_val): + """Sets the array_val of this V1beta1ArrayOrString. + + + :param array_val: The array_val of this V1beta1ArrayOrString. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and array_val is None: # noqa: E501 + raise ValueError("Invalid value for `array_val`, must not be `None`") # noqa: E501 + + self._array_val = array_val + + @property + def string_val(self): + """Gets the string_val of this V1beta1ArrayOrString. # noqa: E501 + + Represents the stored type of ArrayOrString. # noqa: E501 + + :return: The string_val of this V1beta1ArrayOrString. # noqa: E501 + :rtype: str + """ + return self._string_val + + @string_val.setter + def string_val(self, string_val): + """Sets the string_val of this V1beta1ArrayOrString. + + Represents the stored type of ArrayOrString. # noqa: E501 + + :param string_val: The string_val of this V1beta1ArrayOrString. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and string_val is None: # noqa: E501 + raise ValueError("Invalid value for `string_val`, must not be `None`") # noqa: E501 + + self._string_val = string_val + + @property + def type(self): + """Gets the type of this V1beta1ArrayOrString. # noqa: E501 + + + :return: The type of this V1beta1ArrayOrString. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1ArrayOrString. + + + :param type: The type of this V1beta1ArrayOrString. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ArrayOrString): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ArrayOrString): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_cannot_convert_error.py b/sdk/python/tekton/models/v1beta1_cannot_convert_error.py new file mode 100644 index 000000000..f3129e184 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_cannot_convert_error.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1CannotConvertError(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'field': 'str', + 'message': 'str' + } + + attribute_map = { + 'field': 'Field', + 'message': 'Message' + } + + def __init__(self, field=None, message=None, local_vars_configuration=None): # noqa: E501 + """V1beta1CannotConvertError - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._field = None + self._message = None + self.discriminator = None + + self.field = field + self.message = message + + @property + def field(self): + """Gets the field of this V1beta1CannotConvertError. # noqa: E501 + + + :return: The field of this V1beta1CannotConvertError. # noqa: E501 + :rtype: str + """ + return self._field + + @field.setter + def field(self, field): + """Sets the field of this V1beta1CannotConvertError. + + + :param field: The field of this V1beta1CannotConvertError. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 + raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 + + self._field = field + + @property + def message(self): + """Gets the message of this V1beta1CannotConvertError. # noqa: E501 + + + :return: The message of this V1beta1CannotConvertError. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this V1beta1CannotConvertError. + + + :param message: The message of this V1beta1CannotConvertError. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1CannotConvertError): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1CannotConvertError): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_cloud_event_delivery.py b/sdk/python/tekton/models/v1beta1_cloud_event_delivery.py new file mode 100644 index 000000000..46b3d5fe8 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_cloud_event_delivery.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1CloudEventDelivery(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'status': 'V1beta1CloudEventDeliveryState', + 'target': 'str' + } + + attribute_map = { + 'status': 'status', + 'target': 'target' + } + + def __init__(self, status=None, target=None, local_vars_configuration=None): # noqa: E501 + """V1beta1CloudEventDelivery - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._status = None + self._target = None + self.discriminator = None + + if status is not None: + self.status = status + if target is not None: + self.target = target + + @property + def status(self): + """Gets the status of this V1beta1CloudEventDelivery. # noqa: E501 + + + :return: The status of this V1beta1CloudEventDelivery. # noqa: E501 + :rtype: V1beta1CloudEventDeliveryState + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1CloudEventDelivery. + + + :param status: The status of this V1beta1CloudEventDelivery. # noqa: E501 + :type: V1beta1CloudEventDeliveryState + """ + + self._status = status + + @property + def target(self): + """Gets the target of this V1beta1CloudEventDelivery. # noqa: E501 + + Target points to an addressable # noqa: E501 + + :return: The target of this V1beta1CloudEventDelivery. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this V1beta1CloudEventDelivery. + + Target points to an addressable # noqa: E501 + + :param target: The target of this V1beta1CloudEventDelivery. # noqa: E501 + :type: str + """ + + self._target = target + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1CloudEventDelivery): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1CloudEventDelivery): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_cloud_event_delivery_state.py b/sdk/python/tekton/models/v1beta1_cloud_event_delivery_state.py new file mode 100644 index 000000000..a02b1335c --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_cloud_event_delivery_state.py @@ -0,0 +1,220 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1CloudEventDeliveryState(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'condition': 'str', + 'message': 'str', + 'retry_count': 'int', + 'sent_at': 'V1Time' + } + + attribute_map = { + 'condition': 'condition', + 'message': 'message', + 'retry_count': 'retryCount', + 'sent_at': 'sentAt' + } + + def __init__(self, condition=None, message=None, retry_count=None, sent_at=None, local_vars_configuration=None): # noqa: E501 + """V1beta1CloudEventDeliveryState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._condition = None + self._message = None + self._retry_count = None + self._sent_at = None + self.discriminator = None + + if condition is not None: + self.condition = condition + self.message = message + self.retry_count = retry_count + if sent_at is not None: + self.sent_at = sent_at + + @property + def condition(self): + """Gets the condition of this V1beta1CloudEventDeliveryState. # noqa: E501 + + Current status # noqa: E501 + + :return: The condition of this V1beta1CloudEventDeliveryState. # noqa: E501 + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this V1beta1CloudEventDeliveryState. + + Current status # noqa: E501 + + :param condition: The condition of this V1beta1CloudEventDeliveryState. # noqa: E501 + :type: str + """ + + self._condition = condition + + @property + def message(self): + """Gets the message of this V1beta1CloudEventDeliveryState. # noqa: E501 + + Error is the text of error (if any) # noqa: E501 + + :return: The message of this V1beta1CloudEventDeliveryState. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this V1beta1CloudEventDeliveryState. + + Error is the text of error (if any) # noqa: E501 + + :param message: The message of this V1beta1CloudEventDeliveryState. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + @property + def retry_count(self): + """Gets the retry_count of this V1beta1CloudEventDeliveryState. # noqa: E501 + + RetryCount is the number of attempts of sending the cloud event # noqa: E501 + + :return: The retry_count of this V1beta1CloudEventDeliveryState. # noqa: E501 + :rtype: int + """ + return self._retry_count + + @retry_count.setter + def retry_count(self, retry_count): + """Sets the retry_count of this V1beta1CloudEventDeliveryState. + + RetryCount is the number of attempts of sending the cloud event # noqa: E501 + + :param retry_count: The retry_count of this V1beta1CloudEventDeliveryState. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and retry_count is None: # noqa: E501 + raise ValueError("Invalid value for `retry_count`, must not be `None`") # noqa: E501 + + self._retry_count = retry_count + + @property + def sent_at(self): + """Gets the sent_at of this V1beta1CloudEventDeliveryState. # noqa: E501 + + + :return: The sent_at of this V1beta1CloudEventDeliveryState. # noqa: E501 + :rtype: V1Time + """ + return self._sent_at + + @sent_at.setter + def sent_at(self, sent_at): + """Sets the sent_at of this V1beta1CloudEventDeliveryState. + + + :param sent_at: The sent_at of this V1beta1CloudEventDeliveryState. # noqa: E501 + :type: V1Time + """ + + self._sent_at = sent_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1CloudEventDeliveryState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1CloudEventDeliveryState): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_cluster_task.py b/sdk/python/tekton/models/v1beta1_cluster_task.py new file mode 100644 index 000000000..9c3a30cc4 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_cluster_task.py @@ -0,0 +1,216 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ClusterTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1TaskSpec' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ClusterTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + + @property + def api_version(self): + """Gets the api_version of this V1beta1ClusterTask. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1ClusterTask. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1ClusterTask. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1ClusterTask. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1ClusterTask. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1ClusterTask. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1ClusterTask. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1ClusterTask. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1ClusterTask. # noqa: E501 + + + :return: The metadata of this V1beta1ClusterTask. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1ClusterTask. + + + :param metadata: The metadata of this V1beta1ClusterTask. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1ClusterTask. # noqa: E501 + + + :return: The spec of this V1beta1ClusterTask. # noqa: E501 + :rtype: V1beta1TaskSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1ClusterTask. + + + :param spec: The spec of this V1beta1ClusterTask. # noqa: E501 + :type: V1beta1TaskSpec + """ + + self._spec = spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ClusterTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ClusterTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_cluster_task_list.py b/sdk/python/tekton/models/v1beta1_cluster_task_list.py new file mode 100644 index 000000000..ea6342678 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_cluster_task_list.py @@ -0,0 +1,217 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ClusterTaskList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1beta1ClusterTask]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ClusterTaskList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1ClusterTaskList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1ClusterTaskList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1ClusterTaskList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1ClusterTaskList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1ClusterTaskList. # noqa: E501 + + + :return: The items of this V1beta1ClusterTaskList. # noqa: E501 + :rtype: list[V1beta1ClusterTask] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1ClusterTaskList. + + + :param items: The items of this V1beta1ClusterTaskList. # noqa: E501 + :type: list[V1beta1ClusterTask] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1ClusterTaskList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1ClusterTaskList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1ClusterTaskList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1ClusterTaskList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1ClusterTaskList. # noqa: E501 + + + :return: The metadata of this V1beta1ClusterTaskList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1ClusterTaskList. + + + :param metadata: The metadata of this V1beta1ClusterTaskList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ClusterTaskList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ClusterTaskList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_condition_check.py b/sdk/python/tekton/models/v1beta1_condition_check.py new file mode 100644 index 000000000..6080fc9ce --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_condition_check.py @@ -0,0 +1,242 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ConditionCheck(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1TaskRunSpec', + 'status': 'V1beta1TaskRunStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ConditionCheck - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1ConditionCheck. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1ConditionCheck. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1ConditionCheck. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1ConditionCheck. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1ConditionCheck. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1ConditionCheck. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1ConditionCheck. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1ConditionCheck. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1ConditionCheck. # noqa: E501 + + + :return: The metadata of this V1beta1ConditionCheck. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1ConditionCheck. + + + :param metadata: The metadata of this V1beta1ConditionCheck. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1ConditionCheck. # noqa: E501 + + + :return: The spec of this V1beta1ConditionCheck. # noqa: E501 + :rtype: V1beta1TaskRunSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1ConditionCheck. + + + :param spec: The spec of this V1beta1ConditionCheck. # noqa: E501 + :type: V1beta1TaskRunSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1ConditionCheck. # noqa: E501 + + + :return: The status of this V1beta1ConditionCheck. # noqa: E501 + :rtype: V1beta1TaskRunStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1ConditionCheck. + + + :param status: The status of this V1beta1ConditionCheck. # noqa: E501 + :type: V1beta1TaskRunStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ConditionCheck): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ConditionCheck): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_condition_check_status.py b/sdk/python/tekton/models/v1beta1_condition_check_status.py new file mode 100644 index 000000000..ee47827c6 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_condition_check_status.py @@ -0,0 +1,299 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ConditionCheckStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'annotations': 'dict(str, str)', + 'check': 'V1ContainerState', + 'completion_time': 'V1Time', + 'conditions': 'list[KnativeCondition]', + 'observed_generation': 'int', + 'pod_name': 'str', + 'start_time': 'V1Time' + } + + attribute_map = { + 'annotations': 'annotations', + 'check': 'check', + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'observed_generation': 'observedGeneration', + 'pod_name': 'podName', + 'start_time': 'startTime' + } + + def __init__(self, annotations=None, check=None, completion_time=None, conditions=None, observed_generation=None, pod_name=None, start_time=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ConditionCheckStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._annotations = None + self._check = None + self._completion_time = None + self._conditions = None + self._observed_generation = None + self._pod_name = None + self._start_time = None + self.discriminator = None + + if annotations is not None: + self.annotations = annotations + if check is not None: + self.check = check + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if observed_generation is not None: + self.observed_generation = observed_generation + self.pod_name = pod_name + if start_time is not None: + self.start_time = start_time + + @property + def annotations(self): + """Gets the annotations of this V1beta1ConditionCheckStatus. # noqa: E501 + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :return: The annotations of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: dict(str, str) + """ + return self._annotations + + @annotations.setter + def annotations(self, annotations): + """Sets the annotations of this V1beta1ConditionCheckStatus. + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :param annotations: The annotations of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: dict(str, str) + """ + + self._annotations = annotations + + @property + def check(self): + """Gets the check of this V1beta1ConditionCheckStatus. # noqa: E501 + + + :return: The check of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: V1ContainerState + """ + return self._check + + @check.setter + def check(self, check): + """Sets the check of this V1beta1ConditionCheckStatus. + + + :param check: The check of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: V1ContainerState + """ + + self._check = check + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1ConditionCheckStatus. # noqa: E501 + + + :return: The completion_time of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1ConditionCheckStatus. + + + :param completion_time: The completion_time of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1ConditionCheckStatus. # noqa: E501 + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :return: The conditions of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: list[KnativeCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1ConditionCheckStatus. + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :param conditions: The conditions of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: list[KnativeCondition] + """ + + self._conditions = conditions + + @property + def observed_generation(self): + """Gets the observed_generation of this V1beta1ConditionCheckStatus. # noqa: E501 + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :return: The observed_generation of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: int + """ + return self._observed_generation + + @observed_generation.setter + def observed_generation(self, observed_generation): + """Sets the observed_generation of this V1beta1ConditionCheckStatus. + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :param observed_generation: The observed_generation of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: int + """ + + self._observed_generation = observed_generation + + @property + def pod_name(self): + """Gets the pod_name of this V1beta1ConditionCheckStatus. # noqa: E501 + + PodName is the name of the pod responsible for executing this condition check. # noqa: E501 + + :return: The pod_name of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: str + """ + return self._pod_name + + @pod_name.setter + def pod_name(self, pod_name): + """Sets the pod_name of this V1beta1ConditionCheckStatus. + + PodName is the name of the pod responsible for executing this condition check. # noqa: E501 + + :param pod_name: The pod_name of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pod_name is None: # noqa: E501 + raise ValueError("Invalid value for `pod_name`, must not be `None`") # noqa: E501 + + self._pod_name = pod_name + + @property + def start_time(self): + """Gets the start_time of this V1beta1ConditionCheckStatus. # noqa: E501 + + + :return: The start_time of this V1beta1ConditionCheckStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1ConditionCheckStatus. + + + :param start_time: The start_time of this V1beta1ConditionCheckStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ConditionCheckStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ConditionCheckStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_condition_check_status_fields.py b/sdk/python/tekton/models/v1beta1_condition_check_status_fields.py new file mode 100644 index 000000000..dd0dce21a --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_condition_check_status_fields.py @@ -0,0 +1,215 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ConditionCheckStatusFields(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'check': 'V1ContainerState', + 'completion_time': 'V1Time', + 'pod_name': 'str', + 'start_time': 'V1Time' + } + + attribute_map = { + 'check': 'check', + 'completion_time': 'completionTime', + 'pod_name': 'podName', + 'start_time': 'startTime' + } + + def __init__(self, check=None, completion_time=None, pod_name=None, start_time=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ConditionCheckStatusFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._check = None + self._completion_time = None + self._pod_name = None + self._start_time = None + self.discriminator = None + + if check is not None: + self.check = check + if completion_time is not None: + self.completion_time = completion_time + self.pod_name = pod_name + if start_time is not None: + self.start_time = start_time + + @property + def check(self): + """Gets the check of this V1beta1ConditionCheckStatusFields. # noqa: E501 + + + :return: The check of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :rtype: V1ContainerState + """ + return self._check + + @check.setter + def check(self, check): + """Sets the check of this V1beta1ConditionCheckStatusFields. + + + :param check: The check of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :type: V1ContainerState + """ + + self._check = check + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + + + :return: The completion_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1ConditionCheckStatusFields. + + + :param completion_time: The completion_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def pod_name(self): + """Gets the pod_name of this V1beta1ConditionCheckStatusFields. # noqa: E501 + + PodName is the name of the pod responsible for executing this condition check. # noqa: E501 + + :return: The pod_name of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :rtype: str + """ + return self._pod_name + + @pod_name.setter + def pod_name(self, pod_name): + """Sets the pod_name of this V1beta1ConditionCheckStatusFields. + + PodName is the name of the pod responsible for executing this condition check. # noqa: E501 + + :param pod_name: The pod_name of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pod_name is None: # noqa: E501 + raise ValueError("Invalid value for `pod_name`, must not be `None`") # noqa: E501 + + self._pod_name = pod_name + + @property + def start_time(self): + """Gets the start_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + + + :return: The start_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1ConditionCheckStatusFields. + + + :param start_time: The start_time of this V1beta1ConditionCheckStatusFields. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ConditionCheckStatusFields): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ConditionCheckStatusFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_embedded_task.py b/sdk/python/tekton/models/v1beta1_embedded_task.py new file mode 100644 index 000000000..3c8cdbe1c --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_embedded_task.py @@ -0,0 +1,382 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1EmbeddedTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'metadata': 'V1beta1PipelineTaskMetadata', + 'params': 'list[V1beta1ParamSpec]', + 'resources': 'V1beta1TaskResources', + 'results': 'list[V1beta1TaskResult]', + 'sidecars': 'list[V1beta1Sidecar]', + 'step_template': 'V1Container', + 'steps': 'list[V1beta1Step]', + 'volumes': 'list[V1Volume]', + 'workspaces': 'list[V1beta1WorkspaceDeclaration]' + } + + attribute_map = { + 'description': 'description', + 'metadata': 'metadata', + 'params': 'params', + 'resources': 'resources', + 'results': 'results', + 'sidecars': 'sidecars', + 'step_template': 'stepTemplate', + 'steps': 'steps', + 'volumes': 'volumes', + 'workspaces': 'workspaces' + } + + def __init__(self, description=None, metadata=None, params=None, resources=None, results=None, sidecars=None, step_template=None, steps=None, volumes=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1EmbeddedTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._metadata = None + self._params = None + self._resources = None + self._results = None + self._sidecars = None + self._step_template = None + self._steps = None + self._volumes = None + self._workspaces = None + self.discriminator = None + + if description is not None: + self.description = description + if metadata is not None: + self.metadata = metadata + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + if results is not None: + self.results = results + if sidecars is not None: + self.sidecars = sidecars + if step_template is not None: + self.step_template = step_template + if steps is not None: + self.steps = steps + if volumes is not None: + self.volumes = volumes + if workspaces is not None: + self.workspaces = workspaces + + @property + def description(self): + """Gets the description of this V1beta1EmbeddedTask. # noqa: E501 + + Description is a user-facing description of the task that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1EmbeddedTask. + + Description is a user-facing description of the task that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1beta1EmbeddedTask. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def metadata(self): + """Gets the metadata of this V1beta1EmbeddedTask. # noqa: E501 + + + :return: The metadata of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: V1beta1PipelineTaskMetadata + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1EmbeddedTask. + + + :param metadata: The metadata of this V1beta1EmbeddedTask. # noqa: E501 + :type: V1beta1PipelineTaskMetadata + """ + + self._metadata = metadata + + @property + def params(self): + """Gets the params of this V1beta1EmbeddedTask. # noqa: E501 + + Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. # noqa: E501 + + :return: The params of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1beta1ParamSpec] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1EmbeddedTask. + + Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. # noqa: E501 + + :param params: The params of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1beta1ParamSpec] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1EmbeddedTask. # noqa: E501 + + + :return: The resources of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: V1beta1TaskResources + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1EmbeddedTask. + + + :param resources: The resources of this V1beta1EmbeddedTask. # noqa: E501 + :type: V1beta1TaskResources + """ + + self._resources = resources + + @property + def results(self): + """Gets the results of this V1beta1EmbeddedTask. # noqa: E501 + + Results are values that this Task can output # noqa: E501 + + :return: The results of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1beta1TaskResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this V1beta1EmbeddedTask. + + Results are values that this Task can output # noqa: E501 + + :param results: The results of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1beta1TaskResult] + """ + + self._results = results + + @property + def sidecars(self): + """Gets the sidecars of this V1beta1EmbeddedTask. # noqa: E501 + + Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. # noqa: E501 + + :return: The sidecars of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1beta1Sidecar] + """ + return self._sidecars + + @sidecars.setter + def sidecars(self, sidecars): + """Sets the sidecars of this V1beta1EmbeddedTask. + + Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. # noqa: E501 + + :param sidecars: The sidecars of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1beta1Sidecar] + """ + + self._sidecars = sidecars + + @property + def step_template(self): + """Gets the step_template of this V1beta1EmbeddedTask. # noqa: E501 + + + :return: The step_template of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: V1Container + """ + return self._step_template + + @step_template.setter + def step_template(self, step_template): + """Sets the step_template of this V1beta1EmbeddedTask. + + + :param step_template: The step_template of this V1beta1EmbeddedTask. # noqa: E501 + :type: V1Container + """ + + self._step_template = step_template + + @property + def steps(self): + """Gets the steps of this V1beta1EmbeddedTask. # noqa: E501 + + Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. # noqa: E501 + + :return: The steps of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1beta1Step] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this V1beta1EmbeddedTask. + + Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. # noqa: E501 + + :param steps: The steps of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1beta1Step] + """ + + self._steps = steps + + @property + def volumes(self): + """Gets the volumes of this V1beta1EmbeddedTask. # noqa: E501 + + Volumes is a collection of volumes that are available to mount into the steps of the build. # noqa: E501 + + :return: The volumes of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1Volume] + """ + return self._volumes + + @volumes.setter + def volumes(self, volumes): + """Sets the volumes of this V1beta1EmbeddedTask. + + Volumes is a collection of volumes that are available to mount into the steps of the build. # noqa: E501 + + :param volumes: The volumes of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1Volume] + """ + + self._volumes = volumes + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1EmbeddedTask. # noqa: E501 + + Workspaces are the volumes that this Task requires. # noqa: E501 + + :return: The workspaces of this V1beta1EmbeddedTask. # noqa: E501 + :rtype: list[V1beta1WorkspaceDeclaration] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1EmbeddedTask. + + Workspaces are the volumes that this Task requires. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1EmbeddedTask. # noqa: E501 + :type: list[V1beta1WorkspaceDeclaration] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1EmbeddedTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1EmbeddedTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_internal_task_modifier.py b/sdk/python/tekton/models/v1beta1_internal_task_modifier.py new file mode 100644 index 000000000..beb0a3176 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_internal_task_modifier.py @@ -0,0 +1,189 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1InternalTaskModifier(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'steps_to_append': 'list[V1beta1Step]', + 'steps_to_prepend': 'list[V1beta1Step]', + 'volumes': 'list[V1Volume]' + } + + attribute_map = { + 'steps_to_append': 'StepsToAppend', + 'steps_to_prepend': 'StepsToPrepend', + 'volumes': 'Volumes' + } + + def __init__(self, steps_to_append=None, steps_to_prepend=None, volumes=None, local_vars_configuration=None): # noqa: E501 + """V1beta1InternalTaskModifier - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._steps_to_append = None + self._steps_to_prepend = None + self._volumes = None + self.discriminator = None + + self.steps_to_append = steps_to_append + self.steps_to_prepend = steps_to_prepend + self.volumes = volumes + + @property + def steps_to_append(self): + """Gets the steps_to_append of this V1beta1InternalTaskModifier. # noqa: E501 + + + :return: The steps_to_append of this V1beta1InternalTaskModifier. # noqa: E501 + :rtype: list[V1beta1Step] + """ + return self._steps_to_append + + @steps_to_append.setter + def steps_to_append(self, steps_to_append): + """Sets the steps_to_append of this V1beta1InternalTaskModifier. + + + :param steps_to_append: The steps_to_append of this V1beta1InternalTaskModifier. # noqa: E501 + :type: list[V1beta1Step] + """ + if self.local_vars_configuration.client_side_validation and steps_to_append is None: # noqa: E501 + raise ValueError("Invalid value for `steps_to_append`, must not be `None`") # noqa: E501 + + self._steps_to_append = steps_to_append + + @property + def steps_to_prepend(self): + """Gets the steps_to_prepend of this V1beta1InternalTaskModifier. # noqa: E501 + + + :return: The steps_to_prepend of this V1beta1InternalTaskModifier. # noqa: E501 + :rtype: list[V1beta1Step] + """ + return self._steps_to_prepend + + @steps_to_prepend.setter + def steps_to_prepend(self, steps_to_prepend): + """Sets the steps_to_prepend of this V1beta1InternalTaskModifier. + + + :param steps_to_prepend: The steps_to_prepend of this V1beta1InternalTaskModifier. # noqa: E501 + :type: list[V1beta1Step] + """ + if self.local_vars_configuration.client_side_validation and steps_to_prepend is None: # noqa: E501 + raise ValueError("Invalid value for `steps_to_prepend`, must not be `None`") # noqa: E501 + + self._steps_to_prepend = steps_to_prepend + + @property + def volumes(self): + """Gets the volumes of this V1beta1InternalTaskModifier. # noqa: E501 + + + :return: The volumes of this V1beta1InternalTaskModifier. # noqa: E501 + :rtype: list[V1Volume] + """ + return self._volumes + + @volumes.setter + def volumes(self, volumes): + """Sets the volumes of this V1beta1InternalTaskModifier. + + + :param volumes: The volumes of this V1beta1InternalTaskModifier. # noqa: E501 + :type: list[V1Volume] + """ + if self.local_vars_configuration.client_side_validation and volumes is None: # noqa: E501 + raise ValueError("Invalid value for `volumes`, must not be `None`") # noqa: E501 + + self._volumes = volumes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1InternalTaskModifier): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1InternalTaskModifier): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_param.py b/sdk/python/tekton/models/v1beta1_param.py new file mode 100644 index 000000000..a01764305 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_param.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1Param(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'V1beta1ArrayOrString' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Param - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1Param. # noqa: E501 + + + :return: The name of this V1beta1Param. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1Param. + + + :param name: The name of this V1beta1Param. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1Param. # noqa: E501 + + + :return: The value of this V1beta1Param. # noqa: E501 + :rtype: V1beta1ArrayOrString + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1Param. + + + :param value: The value of this V1beta1Param. # noqa: E501 + :type: V1beta1ArrayOrString + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Param): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1Param): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_param_spec.py b/sdk/python/tekton/models/v1beta1_param_spec.py new file mode 100644 index 000000000..ba83c74ba --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_param_spec.py @@ -0,0 +1,219 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ParamSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'default': 'V1beta1ArrayOrString', + 'description': 'str', + 'name': 'str', + 'type': 'str' + } + + attribute_map = { + 'default': 'default', + 'description': 'description', + 'name': 'name', + 'type': 'type' + } + + def __init__(self, default=None, description=None, name=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ParamSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._default = None + self._description = None + self._name = None + self._type = None + self.discriminator = None + + if default is not None: + self.default = default + if description is not None: + self.description = description + self.name = name + if type is not None: + self.type = type + + @property + def default(self): + """Gets the default of this V1beta1ParamSpec. # noqa: E501 + + + :return: The default of this V1beta1ParamSpec. # noqa: E501 + :rtype: V1beta1ArrayOrString + """ + return self._default + + @default.setter + def default(self, default): + """Sets the default of this V1beta1ParamSpec. + + + :param default: The default of this V1beta1ParamSpec. # noqa: E501 + :type: V1beta1ArrayOrString + """ + + self._default = default + + @property + def description(self): + """Gets the description of this V1beta1ParamSpec. # noqa: E501 + + Description is a user-facing description of the parameter that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1beta1ParamSpec. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1ParamSpec. + + Description is a user-facing description of the parameter that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1beta1ParamSpec. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1ParamSpec. # noqa: E501 + + Name declares the name by which a parameter is referenced. # noqa: E501 + + :return: The name of this V1beta1ParamSpec. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1ParamSpec. + + Name declares the name by which a parameter is referenced. # noqa: E501 + + :param name: The name of this V1beta1ParamSpec. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this V1beta1ParamSpec. # noqa: E501 + + Type is the user-specified type of the parameter. The possible types are currently \"string\" and \"array\", and \"string\" is the default. # noqa: E501 + + :return: The type of this V1beta1ParamSpec. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1ParamSpec. + + Type is the user-specified type of the parameter. The possible types are currently \"string\" and \"array\", and \"string\" is the default. # noqa: E501 + + :param type: The type of this V1beta1ParamSpec. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ParamSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ParamSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline.py b/sdk/python/tekton/models/v1beta1_pipeline.py new file mode 100644 index 000000000..939776c1d --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline.py @@ -0,0 +1,216 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1Pipeline(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1PipelineSpec' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Pipeline - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + + @property + def api_version(self): + """Gets the api_version of this V1beta1Pipeline. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1Pipeline. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1Pipeline. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1Pipeline. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1Pipeline. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1Pipeline. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1Pipeline. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1Pipeline. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1Pipeline. # noqa: E501 + + + :return: The metadata of this V1beta1Pipeline. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1Pipeline. + + + :param metadata: The metadata of this V1beta1Pipeline. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1Pipeline. # noqa: E501 + + + :return: The spec of this V1beta1Pipeline. # noqa: E501 + :rtype: V1beta1PipelineSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1Pipeline. + + + :param spec: The spec of this V1beta1Pipeline. # noqa: E501 + :type: V1beta1PipelineSpec + """ + + self._spec = spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Pipeline): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1Pipeline): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_declared_resource.py b/sdk/python/tekton/models/v1beta1_pipeline_declared_resource.py new file mode 100644 index 000000000..aa1caafc7 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_declared_resource.py @@ -0,0 +1,194 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineDeclaredResource(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'optional': 'bool', + 'type': 'str' + } + + attribute_map = { + 'name': 'name', + 'optional': 'optional', + 'type': 'type' + } + + def __init__(self, name=None, optional=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineDeclaredResource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._optional = None + self._type = None + self.discriminator = None + + self.name = name + if optional is not None: + self.optional = optional + self.type = type + + @property + def name(self): + """Gets the name of this V1beta1PipelineDeclaredResource. # noqa: E501 + + Name is the name that will be used by the Pipeline to refer to this resource. It does not directly correspond to the name of any PipelineResources Task inputs or outputs, and it does not correspond to the actual names of the PipelineResources that will be bound in the PipelineRun. # noqa: E501 + + :return: The name of this V1beta1PipelineDeclaredResource. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineDeclaredResource. + + Name is the name that will be used by the Pipeline to refer to this resource. It does not directly correspond to the name of any PipelineResources Task inputs or outputs, and it does not correspond to the actual names of the PipelineResources that will be bound in the PipelineRun. # noqa: E501 + + :param name: The name of this V1beta1PipelineDeclaredResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def optional(self): + """Gets the optional of this V1beta1PipelineDeclaredResource. # noqa: E501 + + Optional declares the resource as optional. optional: true - the resource is considered optional optional: false - the resource is considered required (default/equivalent of not specifying it) # noqa: E501 + + :return: The optional of this V1beta1PipelineDeclaredResource. # noqa: E501 + :rtype: bool + """ + return self._optional + + @optional.setter + def optional(self, optional): + """Sets the optional of this V1beta1PipelineDeclaredResource. + + Optional declares the resource as optional. optional: true - the resource is considered optional optional: false - the resource is considered required (default/equivalent of not specifying it) # noqa: E501 + + :param optional: The optional of this V1beta1PipelineDeclaredResource. # noqa: E501 + :type: bool + """ + + self._optional = optional + + @property + def type(self): + """Gets the type of this V1beta1PipelineDeclaredResource. # noqa: E501 + + Type is the type of the PipelineResource. # noqa: E501 + + :return: The type of this V1beta1PipelineDeclaredResource. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1PipelineDeclaredResource. + + Type is the type of the PipelineResource. # noqa: E501 + + :param type: The type of this V1beta1PipelineDeclaredResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineDeclaredResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineDeclaredResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_list.py b/sdk/python/tekton/models/v1beta1_pipeline_list.py new file mode 100644 index 000000000..ccb98d3f8 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_list.py @@ -0,0 +1,217 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1beta1Pipeline]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1PipelineList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1PipelineList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1PipelineList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1PipelineList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1PipelineList. # noqa: E501 + + + :return: The items of this V1beta1PipelineList. # noqa: E501 + :rtype: list[V1beta1Pipeline] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1PipelineList. + + + :param items: The items of this V1beta1PipelineList. # noqa: E501 + :type: list[V1beta1Pipeline] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1PipelineList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1PipelineList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1PipelineList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1PipelineList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1PipelineList. # noqa: E501 + + + :return: The metadata of this V1beta1PipelineList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1PipelineList. + + + :param metadata: The metadata of this V1beta1PipelineList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_ref.py b/sdk/python/tekton/models/v1beta1_pipeline_ref.py new file mode 100644 index 000000000..cf5bdeafc --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_ref.py @@ -0,0 +1,192 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRef(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'bundle': 'str', + 'name': 'str' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'bundle': 'bundle', + 'name': 'name' + } + + def __init__(self, api_version=None, bundle=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRef - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._bundle = None + self._name = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if bundle is not None: + self.bundle = bundle + if name is not None: + self.name = name + + @property + def api_version(self): + """Gets the api_version of this V1beta1PipelineRef. # noqa: E501 + + API version of the referent # noqa: E501 + + :return: The api_version of this V1beta1PipelineRef. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1PipelineRef. + + API version of the referent # noqa: E501 + + :param api_version: The api_version of this V1beta1PipelineRef. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def bundle(self): + """Gets the bundle of this V1beta1PipelineRef. # noqa: E501 + + Bundle url reference to a Tekton Bundle. # noqa: E501 + + :return: The bundle of this V1beta1PipelineRef. # noqa: E501 + :rtype: str + """ + return self._bundle + + @bundle.setter + def bundle(self, bundle): + """Sets the bundle of this V1beta1PipelineRef. + + Bundle url reference to a Tekton Bundle. # noqa: E501 + + :param bundle: The bundle of this V1beta1PipelineRef. # noqa: E501 + :type: str + """ + + self._bundle = bundle + + @property + def name(self): + """Gets the name of this V1beta1PipelineRef. # noqa: E501 + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :return: The name of this V1beta1PipelineRef. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineRef. + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :param name: The name of this V1beta1PipelineRef. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRef): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRef): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_resource_binding.py b/sdk/python/tekton/models/v1beta1_pipeline_resource_binding.py new file mode 100644 index 000000000..03383e002 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_resource_binding.py @@ -0,0 +1,188 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineResourceBinding(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'resource_ref': 'V1beta1PipelineResourceRef', + 'resource_spec': 'V1alpha1PipelineResourceSpec' + } + + attribute_map = { + 'name': 'name', + 'resource_ref': 'resourceRef', + 'resource_spec': 'resourceSpec' + } + + def __init__(self, name=None, resource_ref=None, resource_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineResourceBinding - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._resource_ref = None + self._resource_spec = None + self.discriminator = None + + if name is not None: + self.name = name + if resource_ref is not None: + self.resource_ref = resource_ref + if resource_spec is not None: + self.resource_spec = resource_spec + + @property + def name(self): + """Gets the name of this V1beta1PipelineResourceBinding. # noqa: E501 + + Name is the name of the PipelineResource in the Pipeline's declaration # noqa: E501 + + :return: The name of this V1beta1PipelineResourceBinding. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineResourceBinding. + + Name is the name of the PipelineResource in the Pipeline's declaration # noqa: E501 + + :param name: The name of this V1beta1PipelineResourceBinding. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def resource_ref(self): + """Gets the resource_ref of this V1beta1PipelineResourceBinding. # noqa: E501 + + + :return: The resource_ref of this V1beta1PipelineResourceBinding. # noqa: E501 + :rtype: V1beta1PipelineResourceRef + """ + return self._resource_ref + + @resource_ref.setter + def resource_ref(self, resource_ref): + """Sets the resource_ref of this V1beta1PipelineResourceBinding. + + + :param resource_ref: The resource_ref of this V1beta1PipelineResourceBinding. # noqa: E501 + :type: V1beta1PipelineResourceRef + """ + + self._resource_ref = resource_ref + + @property + def resource_spec(self): + """Gets the resource_spec of this V1beta1PipelineResourceBinding. # noqa: E501 + + + :return: The resource_spec of this V1beta1PipelineResourceBinding. # noqa: E501 + :rtype: V1alpha1PipelineResourceSpec + """ + return self._resource_spec + + @resource_spec.setter + def resource_spec(self, resource_spec): + """Sets the resource_spec of this V1beta1PipelineResourceBinding. + + + :param resource_spec: The resource_spec of this V1beta1PipelineResourceBinding. # noqa: E501 + :type: V1alpha1PipelineResourceSpec + """ + + self._resource_spec = resource_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineResourceBinding): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineResourceBinding): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_resource_ref.py b/sdk/python/tekton/models/v1beta1_pipeline_resource_ref.py new file mode 100644 index 000000000..92f098669 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_resource_ref.py @@ -0,0 +1,164 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineResourceRef(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'name': 'str' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'name': 'name' + } + + def __init__(self, api_version=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineResourceRef - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._name = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if name is not None: + self.name = name + + @property + def api_version(self): + """Gets the api_version of this V1beta1PipelineResourceRef. # noqa: E501 + + API version of the referent # noqa: E501 + + :return: The api_version of this V1beta1PipelineResourceRef. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1PipelineResourceRef. + + API version of the referent # noqa: E501 + + :param api_version: The api_version of this V1beta1PipelineResourceRef. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def name(self): + """Gets the name of this V1beta1PipelineResourceRef. # noqa: E501 + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :return: The name of this V1beta1PipelineResourceRef. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineResourceRef. + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :param name: The name of this V1beta1PipelineResourceRef. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineResourceRef): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineResourceRef): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_resource_result.py b/sdk/python/tekton/models/v1beta1_pipeline_resource_result.py new file mode 100644 index 000000000..7bfe92cd0 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_resource_result.py @@ -0,0 +1,240 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineResourceResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'key': 'str', + 'resource_name': 'str', + 'resource_ref': 'V1beta1PipelineResourceRef', + 'type': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'resource_name': 'resourceName', + 'resource_ref': 'resourceRef', + 'type': 'type', + 'value': 'value' + } + + def __init__(self, key=None, resource_name=None, resource_ref=None, type=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineResourceResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._key = None + self._resource_name = None + self._resource_ref = None + self._type = None + self._value = None + self.discriminator = None + + self.key = key + if resource_name is not None: + self.resource_name = resource_name + if resource_ref is not None: + self.resource_ref = resource_ref + if type is not None: + self.type = type + self.value = value + + @property + def key(self): + """Gets the key of this V1beta1PipelineResourceResult. # noqa: E501 + + + :return: The key of this V1beta1PipelineResourceResult. # noqa: E501 + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this V1beta1PipelineResourceResult. + + + :param key: The key of this V1beta1PipelineResourceResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and key is None: # noqa: E501 + raise ValueError("Invalid value for `key`, must not be `None`") # noqa: E501 + + self._key = key + + @property + def resource_name(self): + """Gets the resource_name of this V1beta1PipelineResourceResult. # noqa: E501 + + + :return: The resource_name of this V1beta1PipelineResourceResult. # noqa: E501 + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """Sets the resource_name of this V1beta1PipelineResourceResult. + + + :param resource_name: The resource_name of this V1beta1PipelineResourceResult. # noqa: E501 + :type: str + """ + + self._resource_name = resource_name + + @property + def resource_ref(self): + """Gets the resource_ref of this V1beta1PipelineResourceResult. # noqa: E501 + + + :return: The resource_ref of this V1beta1PipelineResourceResult. # noqa: E501 + :rtype: V1beta1PipelineResourceRef + """ + return self._resource_ref + + @resource_ref.setter + def resource_ref(self, resource_ref): + """Sets the resource_ref of this V1beta1PipelineResourceResult. + + + :param resource_ref: The resource_ref of this V1beta1PipelineResourceResult. # noqa: E501 + :type: V1beta1PipelineResourceRef + """ + + self._resource_ref = resource_ref + + @property + def type(self): + """Gets the type of this V1beta1PipelineResourceResult. # noqa: E501 + + + :return: The type of this V1beta1PipelineResourceResult. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1PipelineResourceResult. + + + :param type: The type of this V1beta1PipelineResourceResult. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def value(self): + """Gets the value of this V1beta1PipelineResourceResult. # noqa: E501 + + + :return: The value of this V1beta1PipelineResourceResult. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1PipelineResourceResult. + + + :param value: The value of this V1beta1PipelineResourceResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineResourceResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineResourceResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_result.py b/sdk/python/tekton/models/v1beta1_pipeline_result.py new file mode 100644 index 000000000..08e1a8357 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_result.py @@ -0,0 +1,194 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'value': 'value' + } + + def __init__(self, description=None, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._name = None + self._value = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + self.value = value + + @property + def description(self): + """Gets the description of this V1beta1PipelineResult. # noqa: E501 + + Description is a human-readable description of the result # noqa: E501 + + :return: The description of this V1beta1PipelineResult. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1PipelineResult. + + Description is a human-readable description of the result # noqa: E501 + + :param description: The description of this V1beta1PipelineResult. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1PipelineResult. # noqa: E501 + + Name the given name # noqa: E501 + + :return: The name of this V1beta1PipelineResult. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineResult. + + Name the given name # noqa: E501 + + :param name: The name of this V1beta1PipelineResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1PipelineResult. # noqa: E501 + + Value the expression used to retrieve the value # noqa: E501 + + :return: The value of this V1beta1PipelineResult. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1PipelineResult. + + Value the expression used to retrieve the value # noqa: E501 + + :param value: The value of this V1beta1PipelineResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run.py b/sdk/python/tekton/models/v1beta1_pipeline_run.py new file mode 100644 index 000000000..de10655e1 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run.py @@ -0,0 +1,242 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRun(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1PipelineRunSpec', + 'status': 'V1beta1PipelineRunStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRun - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1PipelineRun. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1PipelineRun. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1PipelineRun. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1PipelineRun. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1PipelineRun. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1PipelineRun. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1PipelineRun. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1PipelineRun. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1PipelineRun. # noqa: E501 + + + :return: The metadata of this V1beta1PipelineRun. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1PipelineRun. + + + :param metadata: The metadata of this V1beta1PipelineRun. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1PipelineRun. # noqa: E501 + + + :return: The spec of this V1beta1PipelineRun. # noqa: E501 + :rtype: V1beta1PipelineRunSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1PipelineRun. + + + :param spec: The spec of this V1beta1PipelineRun. # noqa: E501 + :type: V1beta1PipelineRunSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1PipelineRun. # noqa: E501 + + + :return: The status of this V1beta1PipelineRun. # noqa: E501 + :rtype: V1beta1PipelineRunStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1PipelineRun. + + + :param status: The status of this V1beta1PipelineRun. # noqa: E501 + :type: V1beta1PipelineRunStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRun): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRun): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_condition_check_status.py b/sdk/python/tekton/models/v1beta1_pipeline_run_condition_check_status.py new file mode 100644 index 000000000..fd9ee8f0c --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_condition_check_status.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunConditionCheckStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'condition_name': 'str', + 'status': 'V1beta1ConditionCheckStatus' + } + + attribute_map = { + 'condition_name': 'conditionName', + 'status': 'status' + } + + def __init__(self, condition_name=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunConditionCheckStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._condition_name = None + self._status = None + self.discriminator = None + + if condition_name is not None: + self.condition_name = condition_name + if status is not None: + self.status = status + + @property + def condition_name(self): + """Gets the condition_name of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + + ConditionName is the name of the Condition # noqa: E501 + + :return: The condition_name of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + :rtype: str + """ + return self._condition_name + + @condition_name.setter + def condition_name(self, condition_name): + """Sets the condition_name of this V1beta1PipelineRunConditionCheckStatus. + + ConditionName is the name of the Condition # noqa: E501 + + :param condition_name: The condition_name of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + :type: str + """ + + self._condition_name = condition_name + + @property + def status(self): + """Gets the status of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + + + :return: The status of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + :rtype: V1beta1ConditionCheckStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1PipelineRunConditionCheckStatus. + + + :param status: The status of this V1beta1PipelineRunConditionCheckStatus. # noqa: E501 + :type: V1beta1ConditionCheckStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunConditionCheckStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunConditionCheckStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_list.py b/sdk/python/tekton/models/v1beta1_pipeline_run_list.py new file mode 100644 index 000000000..081c856e0 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_list.py @@ -0,0 +1,216 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1beta1PipelineRun]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if items is not None: + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1PipelineRunList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1PipelineRunList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1PipelineRunList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1PipelineRunList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1PipelineRunList. # noqa: E501 + + + :return: The items of this V1beta1PipelineRunList. # noqa: E501 + :rtype: list[V1beta1PipelineRun] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1PipelineRunList. + + + :param items: The items of this V1beta1PipelineRunList. # noqa: E501 + :type: list[V1beta1PipelineRun] + """ + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1PipelineRunList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1PipelineRunList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1PipelineRunList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1PipelineRunList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1PipelineRunList. # noqa: E501 + + + :return: The metadata of this V1beta1PipelineRunList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1PipelineRunList. + + + :param metadata: The metadata of this V1beta1PipelineRunList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_result.py b/sdk/python/tekton/models/v1beta1_pipeline_run_result.py new file mode 100644 index 000000000..51d8b4cec --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_result.py @@ -0,0 +1,166 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1PipelineRunResult. # noqa: E501 + + Name is the result's name as declared by the Pipeline # noqa: E501 + + :return: The name of this V1beta1PipelineRunResult. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineRunResult. + + Name is the result's name as declared by the Pipeline # noqa: E501 + + :param name: The name of this V1beta1PipelineRunResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1PipelineRunResult. # noqa: E501 + + Value is the result returned from the execution of this PipelineRun # noqa: E501 + + :return: The value of this V1beta1PipelineRunResult. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1PipelineRunResult. + + Value is the result returned from the execution of this PipelineRun # noqa: E501 + + :param value: The value of this V1beta1PipelineRunResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_spec.py b/sdk/python/tekton/models/v1beta1_pipeline_run_spec.py new file mode 100644 index 000000000..a40512645 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_spec.py @@ -0,0 +1,406 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'params': 'list[V1beta1Param]', + 'pipeline_ref': 'V1beta1PipelineRef', + 'pipeline_spec': 'V1beta1PipelineSpec', + 'pod_template': 'PodTemplate', + 'resources': 'list[V1beta1PipelineResourceBinding]', + 'service_account_name': 'str', + 'service_account_names': 'list[V1beta1PipelineRunSpecServiceAccountName]', + 'status': 'str', + 'task_run_specs': 'list[V1beta1PipelineTaskRunSpec]', + 'timeout': 'V1Duration', + 'workspaces': 'list[V1beta1WorkspaceBinding]' + } + + attribute_map = { + 'params': 'params', + 'pipeline_ref': 'pipelineRef', + 'pipeline_spec': 'pipelineSpec', + 'pod_template': 'podTemplate', + 'resources': 'resources', + 'service_account_name': 'serviceAccountName', + 'service_account_names': 'serviceAccountNames', + 'status': 'status', + 'task_run_specs': 'taskRunSpecs', + 'timeout': 'timeout', + 'workspaces': 'workspaces' + } + + def __init__(self, params=None, pipeline_ref=None, pipeline_spec=None, pod_template=None, resources=None, service_account_name=None, service_account_names=None, status=None, task_run_specs=None, timeout=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._params = None + self._pipeline_ref = None + self._pipeline_spec = None + self._pod_template = None + self._resources = None + self._service_account_name = None + self._service_account_names = None + self._status = None + self._task_run_specs = None + self._timeout = None + self._workspaces = None + self.discriminator = None + + if params is not None: + self.params = params + if pipeline_ref is not None: + self.pipeline_ref = pipeline_ref + if pipeline_spec is not None: + self.pipeline_spec = pipeline_spec + if pod_template is not None: + self.pod_template = pod_template + if resources is not None: + self.resources = resources + if service_account_name is not None: + self.service_account_name = service_account_name + if service_account_names is not None: + self.service_account_names = service_account_names + if status is not None: + self.status = status + if task_run_specs is not None: + self.task_run_specs = task_run_specs + if timeout is not None: + self.timeout = timeout + if workspaces is not None: + self.workspaces = workspaces + + @property + def params(self): + """Gets the params of this V1beta1PipelineRunSpec. # noqa: E501 + + Params is a list of parameter names and values. # noqa: E501 + + :return: The params of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: list[V1beta1Param] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1PipelineRunSpec. + + Params is a list of parameter names and values. # noqa: E501 + + :param params: The params of this V1beta1PipelineRunSpec. # noqa: E501 + :type: list[V1beta1Param] + """ + + self._params = params + + @property + def pipeline_ref(self): + """Gets the pipeline_ref of this V1beta1PipelineRunSpec. # noqa: E501 + + + :return: The pipeline_ref of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: V1beta1PipelineRef + """ + return self._pipeline_ref + + @pipeline_ref.setter + def pipeline_ref(self, pipeline_ref): + """Sets the pipeline_ref of this V1beta1PipelineRunSpec. + + + :param pipeline_ref: The pipeline_ref of this V1beta1PipelineRunSpec. # noqa: E501 + :type: V1beta1PipelineRef + """ + + self._pipeline_ref = pipeline_ref + + @property + def pipeline_spec(self): + """Gets the pipeline_spec of this V1beta1PipelineRunSpec. # noqa: E501 + + + :return: The pipeline_spec of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: V1beta1PipelineSpec + """ + return self._pipeline_spec + + @pipeline_spec.setter + def pipeline_spec(self, pipeline_spec): + """Sets the pipeline_spec of this V1beta1PipelineRunSpec. + + + :param pipeline_spec: The pipeline_spec of this V1beta1PipelineRunSpec. # noqa: E501 + :type: V1beta1PipelineSpec + """ + + self._pipeline_spec = pipeline_spec + + @property + def pod_template(self): + """Gets the pod_template of this V1beta1PipelineRunSpec. # noqa: E501 + + + :return: The pod_template of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: PodTemplate + """ + return self._pod_template + + @pod_template.setter + def pod_template(self, pod_template): + """Sets the pod_template of this V1beta1PipelineRunSpec. + + + :param pod_template: The pod_template of this V1beta1PipelineRunSpec. # noqa: E501 + :type: PodTemplate + """ + + self._pod_template = pod_template + + @property + def resources(self): + """Gets the resources of this V1beta1PipelineRunSpec. # noqa: E501 + + Resources is a list of bindings specifying which actual instances of PipelineResources to use for the resources the Pipeline has declared it needs. # noqa: E501 + + :return: The resources of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: list[V1beta1PipelineResourceBinding] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1PipelineRunSpec. + + Resources is a list of bindings specifying which actual instances of PipelineResources to use for the resources the Pipeline has declared it needs. # noqa: E501 + + :param resources: The resources of this V1beta1PipelineRunSpec. # noqa: E501 + :type: list[V1beta1PipelineResourceBinding] + """ + + self._resources = resources + + @property + def service_account_name(self): + """Gets the service_account_name of this V1beta1PipelineRunSpec. # noqa: E501 + + + :return: The service_account_name of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: str + """ + return self._service_account_name + + @service_account_name.setter + def service_account_name(self, service_account_name): + """Sets the service_account_name of this V1beta1PipelineRunSpec. + + + :param service_account_name: The service_account_name of this V1beta1PipelineRunSpec. # noqa: E501 + :type: str + """ + + self._service_account_name = service_account_name + + @property + def service_account_names(self): + """Gets the service_account_names of this V1beta1PipelineRunSpec. # noqa: E501 + + Deprecated: use taskRunSpecs.ServiceAccountName instead # noqa: E501 + + :return: The service_account_names of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: list[V1beta1PipelineRunSpecServiceAccountName] + """ + return self._service_account_names + + @service_account_names.setter + def service_account_names(self, service_account_names): + """Sets the service_account_names of this V1beta1PipelineRunSpec. + + Deprecated: use taskRunSpecs.ServiceAccountName instead # noqa: E501 + + :param service_account_names: The service_account_names of this V1beta1PipelineRunSpec. # noqa: E501 + :type: list[V1beta1PipelineRunSpecServiceAccountName] + """ + + self._service_account_names = service_account_names + + @property + def status(self): + """Gets the status of this V1beta1PipelineRunSpec. # noqa: E501 + + Used for cancelling a pipelinerun (and maybe more later on) # noqa: E501 + + :return: The status of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1PipelineRunSpec. + + Used for cancelling a pipelinerun (and maybe more later on) # noqa: E501 + + :param status: The status of this V1beta1PipelineRunSpec. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def task_run_specs(self): + """Gets the task_run_specs of this V1beta1PipelineRunSpec. # noqa: E501 + + TaskRunSpecs holds a set of runtime specs # noqa: E501 + + :return: The task_run_specs of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: list[V1beta1PipelineTaskRunSpec] + """ + return self._task_run_specs + + @task_run_specs.setter + def task_run_specs(self, task_run_specs): + """Sets the task_run_specs of this V1beta1PipelineRunSpec. + + TaskRunSpecs holds a set of runtime specs # noqa: E501 + + :param task_run_specs: The task_run_specs of this V1beta1PipelineRunSpec. # noqa: E501 + :type: list[V1beta1PipelineTaskRunSpec] + """ + + self._task_run_specs = task_run_specs + + @property + def timeout(self): + """Gets the timeout of this V1beta1PipelineRunSpec. # noqa: E501 + + + :return: The timeout of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: V1Duration + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this V1beta1PipelineRunSpec. + + + :param timeout: The timeout of this V1beta1PipelineRunSpec. # noqa: E501 + :type: V1Duration + """ + + self._timeout = timeout + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1PipelineRunSpec. # noqa: E501 + + Workspaces holds a set of workspace bindings that must match names with those declared in the pipeline. # noqa: E501 + + :return: The workspaces of this V1beta1PipelineRunSpec. # noqa: E501 + :rtype: list[V1beta1WorkspaceBinding] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1PipelineRunSpec. + + Workspaces holds a set of workspace bindings that must match names with those declared in the pipeline. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1PipelineRunSpec. # noqa: E501 + :type: list[V1beta1WorkspaceBinding] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_spec_service_account_name.py b/sdk/python/tekton/models/v1beta1_pipeline_run_spec_service_account_name.py new file mode 100644 index 000000000..1c65263db --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_spec_service_account_name.py @@ -0,0 +1,160 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunSpecServiceAccountName(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'service_account_name': 'str', + 'task_name': 'str' + } + + attribute_map = { + 'service_account_name': 'serviceAccountName', + 'task_name': 'taskName' + } + + def __init__(self, service_account_name=None, task_name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunSpecServiceAccountName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._service_account_name = None + self._task_name = None + self.discriminator = None + + if service_account_name is not None: + self.service_account_name = service_account_name + if task_name is not None: + self.task_name = task_name + + @property + def service_account_name(self): + """Gets the service_account_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + + + :return: The service_account_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + :rtype: str + """ + return self._service_account_name + + @service_account_name.setter + def service_account_name(self, service_account_name): + """Sets the service_account_name of this V1beta1PipelineRunSpecServiceAccountName. + + + :param service_account_name: The service_account_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + :type: str + """ + + self._service_account_name = service_account_name + + @property + def task_name(self): + """Gets the task_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + + + :return: The task_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this V1beta1PipelineRunSpecServiceAccountName. + + + :param task_name: The task_name of this V1beta1PipelineRunSpecServiceAccountName. # noqa: E501 + :type: str + """ + + self._task_name = task_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunSpecServiceAccountName): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunSpecServiceAccountName): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_status.py b/sdk/python/tekton/models/v1beta1_pipeline_run_status.py new file mode 100644 index 000000000..18ac3b0f7 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_status.py @@ -0,0 +1,354 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'annotations': 'dict(str, str)', + 'completion_time': 'V1Time', + 'conditions': 'list[KnativeCondition]', + 'observed_generation': 'int', + 'pipeline_results': 'list[V1beta1PipelineRunResult]', + 'pipeline_spec': 'V1beta1PipelineSpec', + 'skipped_tasks': 'list[V1beta1SkippedTask]', + 'start_time': 'V1Time', + 'task_runs': 'dict(str, V1beta1PipelineRunTaskRunStatus)' + } + + attribute_map = { + 'annotations': 'annotations', + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'observed_generation': 'observedGeneration', + 'pipeline_results': 'pipelineResults', + 'pipeline_spec': 'pipelineSpec', + 'skipped_tasks': 'skippedTasks', + 'start_time': 'startTime', + 'task_runs': 'taskRuns' + } + + def __init__(self, annotations=None, completion_time=None, conditions=None, observed_generation=None, pipeline_results=None, pipeline_spec=None, skipped_tasks=None, start_time=None, task_runs=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._annotations = None + self._completion_time = None + self._conditions = None + self._observed_generation = None + self._pipeline_results = None + self._pipeline_spec = None + self._skipped_tasks = None + self._start_time = None + self._task_runs = None + self.discriminator = None + + if annotations is not None: + self.annotations = annotations + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if observed_generation is not None: + self.observed_generation = observed_generation + if pipeline_results is not None: + self.pipeline_results = pipeline_results + if pipeline_spec is not None: + self.pipeline_spec = pipeline_spec + if skipped_tasks is not None: + self.skipped_tasks = skipped_tasks + if start_time is not None: + self.start_time = start_time + if task_runs is not None: + self.task_runs = task_runs + + @property + def annotations(self): + """Gets the annotations of this V1beta1PipelineRunStatus. # noqa: E501 + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :return: The annotations of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: dict(str, str) + """ + return self._annotations + + @annotations.setter + def annotations(self, annotations): + """Sets the annotations of this V1beta1PipelineRunStatus. + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :param annotations: The annotations of this V1beta1PipelineRunStatus. # noqa: E501 + :type: dict(str, str) + """ + + self._annotations = annotations + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1PipelineRunStatus. # noqa: E501 + + + :return: The completion_time of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1PipelineRunStatus. + + + :param completion_time: The completion_time of this V1beta1PipelineRunStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1PipelineRunStatus. # noqa: E501 + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :return: The conditions of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: list[KnativeCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1PipelineRunStatus. + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :param conditions: The conditions of this V1beta1PipelineRunStatus. # noqa: E501 + :type: list[KnativeCondition] + """ + + self._conditions = conditions + + @property + def observed_generation(self): + """Gets the observed_generation of this V1beta1PipelineRunStatus. # noqa: E501 + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :return: The observed_generation of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: int + """ + return self._observed_generation + + @observed_generation.setter + def observed_generation(self, observed_generation): + """Sets the observed_generation of this V1beta1PipelineRunStatus. + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :param observed_generation: The observed_generation of this V1beta1PipelineRunStatus. # noqa: E501 + :type: int + """ + + self._observed_generation = observed_generation + + @property + def pipeline_results(self): + """Gets the pipeline_results of this V1beta1PipelineRunStatus. # noqa: E501 + + PipelineResults are the list of results written out by the pipeline task's containers # noqa: E501 + + :return: The pipeline_results of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: list[V1beta1PipelineRunResult] + """ + return self._pipeline_results + + @pipeline_results.setter + def pipeline_results(self, pipeline_results): + """Sets the pipeline_results of this V1beta1PipelineRunStatus. + + PipelineResults are the list of results written out by the pipeline task's containers # noqa: E501 + + :param pipeline_results: The pipeline_results of this V1beta1PipelineRunStatus. # noqa: E501 + :type: list[V1beta1PipelineRunResult] + """ + + self._pipeline_results = pipeline_results + + @property + def pipeline_spec(self): + """Gets the pipeline_spec of this V1beta1PipelineRunStatus. # noqa: E501 + + + :return: The pipeline_spec of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: V1beta1PipelineSpec + """ + return self._pipeline_spec + + @pipeline_spec.setter + def pipeline_spec(self, pipeline_spec): + """Sets the pipeline_spec of this V1beta1PipelineRunStatus. + + + :param pipeline_spec: The pipeline_spec of this V1beta1PipelineRunStatus. # noqa: E501 + :type: V1beta1PipelineSpec + """ + + self._pipeline_spec = pipeline_spec + + @property + def skipped_tasks(self): + """Gets the skipped_tasks of this V1beta1PipelineRunStatus. # noqa: E501 + + list of tasks that were skipped due to when expressions evaluating to false # noqa: E501 + + :return: The skipped_tasks of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: list[V1beta1SkippedTask] + """ + return self._skipped_tasks + + @skipped_tasks.setter + def skipped_tasks(self, skipped_tasks): + """Sets the skipped_tasks of this V1beta1PipelineRunStatus. + + list of tasks that were skipped due to when expressions evaluating to false # noqa: E501 + + :param skipped_tasks: The skipped_tasks of this V1beta1PipelineRunStatus. # noqa: E501 + :type: list[V1beta1SkippedTask] + """ + + self._skipped_tasks = skipped_tasks + + @property + def start_time(self): + """Gets the start_time of this V1beta1PipelineRunStatus. # noqa: E501 + + + :return: The start_time of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1PipelineRunStatus. + + + :param start_time: The start_time of this V1beta1PipelineRunStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def task_runs(self): + """Gets the task_runs of this V1beta1PipelineRunStatus. # noqa: E501 + + map of PipelineRunTaskRunStatus with the taskRun name as the key # noqa: E501 + + :return: The task_runs of this V1beta1PipelineRunStatus. # noqa: E501 + :rtype: dict(str, V1beta1PipelineRunTaskRunStatus) + """ + return self._task_runs + + @task_runs.setter + def task_runs(self, task_runs): + """Sets the task_runs of this V1beta1PipelineRunStatus. + + map of PipelineRunTaskRunStatus with the taskRun name as the key # noqa: E501 + + :param task_runs: The task_runs of this V1beta1PipelineRunStatus. # noqa: E501 + :type: dict(str, V1beta1PipelineRunTaskRunStatus) + """ + + self._task_runs = task_runs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_status_fields.py b/sdk/python/tekton/models/v1beta1_pipeline_run_status_fields.py new file mode 100644 index 000000000..b88c441d1 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_status_fields.py @@ -0,0 +1,270 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunStatusFields(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'completion_time': 'V1Time', + 'pipeline_results': 'list[V1beta1PipelineRunResult]', + 'pipeline_spec': 'V1beta1PipelineSpec', + 'skipped_tasks': 'list[V1beta1SkippedTask]', + 'start_time': 'V1Time', + 'task_runs': 'dict(str, V1beta1PipelineRunTaskRunStatus)' + } + + attribute_map = { + 'completion_time': 'completionTime', + 'pipeline_results': 'pipelineResults', + 'pipeline_spec': 'pipelineSpec', + 'skipped_tasks': 'skippedTasks', + 'start_time': 'startTime', + 'task_runs': 'taskRuns' + } + + def __init__(self, completion_time=None, pipeline_results=None, pipeline_spec=None, skipped_tasks=None, start_time=None, task_runs=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunStatusFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._completion_time = None + self._pipeline_results = None + self._pipeline_spec = None + self._skipped_tasks = None + self._start_time = None + self._task_runs = None + self.discriminator = None + + if completion_time is not None: + self.completion_time = completion_time + if pipeline_results is not None: + self.pipeline_results = pipeline_results + if pipeline_spec is not None: + self.pipeline_spec = pipeline_spec + if skipped_tasks is not None: + self.skipped_tasks = skipped_tasks + if start_time is not None: + self.start_time = start_time + if task_runs is not None: + self.task_runs = task_runs + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + + + :return: The completion_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1PipelineRunStatusFields. + + + :param completion_time: The completion_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def pipeline_results(self): + """Gets the pipeline_results of this V1beta1PipelineRunStatusFields. # noqa: E501 + + PipelineResults are the list of results written out by the pipeline task's containers # noqa: E501 + + :return: The pipeline_results of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: list[V1beta1PipelineRunResult] + """ + return self._pipeline_results + + @pipeline_results.setter + def pipeline_results(self, pipeline_results): + """Sets the pipeline_results of this V1beta1PipelineRunStatusFields. + + PipelineResults are the list of results written out by the pipeline task's containers # noqa: E501 + + :param pipeline_results: The pipeline_results of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: list[V1beta1PipelineRunResult] + """ + + self._pipeline_results = pipeline_results + + @property + def pipeline_spec(self): + """Gets the pipeline_spec of this V1beta1PipelineRunStatusFields. # noqa: E501 + + + :return: The pipeline_spec of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: V1beta1PipelineSpec + """ + return self._pipeline_spec + + @pipeline_spec.setter + def pipeline_spec(self, pipeline_spec): + """Sets the pipeline_spec of this V1beta1PipelineRunStatusFields. + + + :param pipeline_spec: The pipeline_spec of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: V1beta1PipelineSpec + """ + + self._pipeline_spec = pipeline_spec + + @property + def skipped_tasks(self): + """Gets the skipped_tasks of this V1beta1PipelineRunStatusFields. # noqa: E501 + + list of tasks that were skipped due to when expressions evaluating to false # noqa: E501 + + :return: The skipped_tasks of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: list[V1beta1SkippedTask] + """ + return self._skipped_tasks + + @skipped_tasks.setter + def skipped_tasks(self, skipped_tasks): + """Sets the skipped_tasks of this V1beta1PipelineRunStatusFields. + + list of tasks that were skipped due to when expressions evaluating to false # noqa: E501 + + :param skipped_tasks: The skipped_tasks of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: list[V1beta1SkippedTask] + """ + + self._skipped_tasks = skipped_tasks + + @property + def start_time(self): + """Gets the start_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + + + :return: The start_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1PipelineRunStatusFields. + + + :param start_time: The start_time of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def task_runs(self): + """Gets the task_runs of this V1beta1PipelineRunStatusFields. # noqa: E501 + + map of PipelineRunTaskRunStatus with the taskRun name as the key # noqa: E501 + + :return: The task_runs of this V1beta1PipelineRunStatusFields. # noqa: E501 + :rtype: dict(str, V1beta1PipelineRunTaskRunStatus) + """ + return self._task_runs + + @task_runs.setter + def task_runs(self, task_runs): + """Sets the task_runs of this V1beta1PipelineRunStatusFields. + + map of PipelineRunTaskRunStatus with the taskRun name as the key # noqa: E501 + + :param task_runs: The task_runs of this V1beta1PipelineRunStatusFields. # noqa: E501 + :type: dict(str, V1beta1PipelineRunTaskRunStatus) + """ + + self._task_runs = task_runs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunStatusFields): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunStatusFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_run_task_run_status.py b/sdk/python/tekton/models/v1beta1_pipeline_run_task_run_status.py new file mode 100644 index 000000000..940b67b7b --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_run_task_run_status.py @@ -0,0 +1,218 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineRunTaskRunStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'condition_checks': 'dict(str, V1beta1PipelineRunConditionCheckStatus)', + 'pipeline_task_name': 'str', + 'status': 'V1beta1TaskRunStatus', + 'when_expressions': 'list[V1beta1WhenExpression]' + } + + attribute_map = { + 'condition_checks': 'conditionChecks', + 'pipeline_task_name': 'pipelineTaskName', + 'status': 'status', + 'when_expressions': 'whenExpressions' + } + + def __init__(self, condition_checks=None, pipeline_task_name=None, status=None, when_expressions=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineRunTaskRunStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._condition_checks = None + self._pipeline_task_name = None + self._status = None + self._when_expressions = None + self.discriminator = None + + if condition_checks is not None: + self.condition_checks = condition_checks + if pipeline_task_name is not None: + self.pipeline_task_name = pipeline_task_name + if status is not None: + self.status = status + if when_expressions is not None: + self.when_expressions = when_expressions + + @property + def condition_checks(self): + """Gets the condition_checks of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + + ConditionChecks maps the name of a condition check to its Status # noqa: E501 + + :return: The condition_checks of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :rtype: dict(str, V1beta1PipelineRunConditionCheckStatus) + """ + return self._condition_checks + + @condition_checks.setter + def condition_checks(self, condition_checks): + """Sets the condition_checks of this V1beta1PipelineRunTaskRunStatus. + + ConditionChecks maps the name of a condition check to its Status # noqa: E501 + + :param condition_checks: The condition_checks of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :type: dict(str, V1beta1PipelineRunConditionCheckStatus) + """ + + self._condition_checks = condition_checks + + @property + def pipeline_task_name(self): + """Gets the pipeline_task_name of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + + PipelineTaskName is the name of the PipelineTask. # noqa: E501 + + :return: The pipeline_task_name of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :rtype: str + """ + return self._pipeline_task_name + + @pipeline_task_name.setter + def pipeline_task_name(self, pipeline_task_name): + """Sets the pipeline_task_name of this V1beta1PipelineRunTaskRunStatus. + + PipelineTaskName is the name of the PipelineTask. # noqa: E501 + + :param pipeline_task_name: The pipeline_task_name of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :type: str + """ + + self._pipeline_task_name = pipeline_task_name + + @property + def status(self): + """Gets the status of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + + + :return: The status of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :rtype: V1beta1TaskRunStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1PipelineRunTaskRunStatus. + + + :param status: The status of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :type: V1beta1TaskRunStatus + """ + + self._status = status + + @property + def when_expressions(self): + """Gets the when_expressions of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + + WhenExpressions is the list of checks guarding the execution of the PipelineTask # noqa: E501 + + :return: The when_expressions of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :rtype: list[V1beta1WhenExpression] + """ + return self._when_expressions + + @when_expressions.setter + def when_expressions(self, when_expressions): + """Sets the when_expressions of this V1beta1PipelineRunTaskRunStatus. + + WhenExpressions is the list of checks guarding the execution of the PipelineTask # noqa: E501 + + :param when_expressions: The when_expressions of this V1beta1PipelineRunTaskRunStatus. # noqa: E501 + :type: list[V1beta1WhenExpression] + """ + + self._when_expressions = when_expressions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineRunTaskRunStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineRunTaskRunStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_spec.py b/sdk/python/tekton/models/v1beta1_pipeline_spec.py new file mode 100644 index 000000000..0d4d615fb --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_spec.py @@ -0,0 +1,304 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + '_finally': 'list[V1beta1PipelineTask]', + 'params': 'list[V1beta1ParamSpec]', + 'resources': 'list[V1beta1PipelineDeclaredResource]', + 'results': 'list[V1beta1PipelineResult]', + 'tasks': 'list[V1beta1PipelineTask]', + 'workspaces': 'list[V1beta1PipelineWorkspaceDeclaration]' + } + + attribute_map = { + 'description': 'description', + '_finally': 'finally', + 'params': 'params', + 'resources': 'resources', + 'results': 'results', + 'tasks': 'tasks', + 'workspaces': 'workspaces' + } + + def __init__(self, description=None, _finally=None, params=None, resources=None, results=None, tasks=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self.__finally = None + self._params = None + self._resources = None + self._results = None + self._tasks = None + self._workspaces = None + self.discriminator = None + + if description is not None: + self.description = description + if _finally is not None: + self._finally = _finally + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + if results is not None: + self.results = results + if tasks is not None: + self.tasks = tasks + if workspaces is not None: + self.workspaces = workspaces + + @property + def description(self): + """Gets the description of this V1beta1PipelineSpec. # noqa: E501 + + Description is a user-facing description of the pipeline that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1beta1PipelineSpec. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1PipelineSpec. + + Description is a user-facing description of the pipeline that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1beta1PipelineSpec. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def _finally(self): + """Gets the _finally of this V1beta1PipelineSpec. # noqa: E501 + + Finally declares the list of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline # noqa: E501 + + :return: The _finally of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1PipelineTask] + """ + return self.__finally + + @_finally.setter + def _finally(self, _finally): + """Sets the _finally of this V1beta1PipelineSpec. + + Finally declares the list of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline # noqa: E501 + + :param _finally: The _finally of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1PipelineTask] + """ + + self.__finally = _finally + + @property + def params(self): + """Gets the params of this V1beta1PipelineSpec. # noqa: E501 + + Params declares a list of input parameters that must be supplied when this Pipeline is run. # noqa: E501 + + :return: The params of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1ParamSpec] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1PipelineSpec. + + Params declares a list of input parameters that must be supplied when this Pipeline is run. # noqa: E501 + + :param params: The params of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1ParamSpec] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1PipelineSpec. # noqa: E501 + + Resources declares the names and types of the resources given to the Pipeline's tasks as inputs and outputs. # noqa: E501 + + :return: The resources of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1PipelineDeclaredResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1PipelineSpec. + + Resources declares the names and types of the resources given to the Pipeline's tasks as inputs and outputs. # noqa: E501 + + :param resources: The resources of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1PipelineDeclaredResource] + """ + + self._resources = resources + + @property + def results(self): + """Gets the results of this V1beta1PipelineSpec. # noqa: E501 + + Results are values that this pipeline can output once run # noqa: E501 + + :return: The results of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1PipelineResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this V1beta1PipelineSpec. + + Results are values that this pipeline can output once run # noqa: E501 + + :param results: The results of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1PipelineResult] + """ + + self._results = results + + @property + def tasks(self): + """Gets the tasks of this V1beta1PipelineSpec. # noqa: E501 + + Tasks declares the graph of Tasks that execute when this Pipeline is run. # noqa: E501 + + :return: The tasks of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1PipelineTask] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this V1beta1PipelineSpec. + + Tasks declares the graph of Tasks that execute when this Pipeline is run. # noqa: E501 + + :param tasks: The tasks of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1PipelineTask] + """ + + self._tasks = tasks + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1PipelineSpec. # noqa: E501 + + Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun. # noqa: E501 + + :return: The workspaces of this V1beta1PipelineSpec. # noqa: E501 + :rtype: list[V1beta1PipelineWorkspaceDeclaration] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1PipelineSpec. + + Workspaces declares a set of named workspaces that are expected to be provided by a PipelineRun. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1PipelineSpec. # noqa: E501 + :type: list[V1beta1PipelineWorkspaceDeclaration] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task.py b/sdk/python/tekton/models/v1beta1_pipeline_task.py new file mode 100644 index 000000000..ac2d877b1 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task.py @@ -0,0 +1,408 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'conditions': 'list[V1beta1PipelineTaskCondition]', + 'name': 'str', + 'params': 'list[V1beta1Param]', + 'resources': 'V1beta1PipelineTaskResources', + 'retries': 'int', + 'run_after': 'list[str]', + 'task_ref': 'V1beta1TaskRef', + 'task_spec': 'V1beta1EmbeddedTask', + 'timeout': 'V1Duration', + 'when': 'list[V1beta1WhenExpression]', + 'workspaces': 'list[V1beta1WorkspacePipelineTaskBinding]' + } + + attribute_map = { + 'conditions': 'conditions', + 'name': 'name', + 'params': 'params', + 'resources': 'resources', + 'retries': 'retries', + 'run_after': 'runAfter', + 'task_ref': 'taskRef', + 'task_spec': 'taskSpec', + 'timeout': 'timeout', + 'when': 'when', + 'workspaces': 'workspaces' + } + + def __init__(self, conditions=None, name=None, params=None, resources=None, retries=None, run_after=None, task_ref=None, task_spec=None, timeout=None, when=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._conditions = None + self._name = None + self._params = None + self._resources = None + self._retries = None + self._run_after = None + self._task_ref = None + self._task_spec = None + self._timeout = None + self._when = None + self._workspaces = None + self.discriminator = None + + if conditions is not None: + self.conditions = conditions + if name is not None: + self.name = name + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + if retries is not None: + self.retries = retries + if run_after is not None: + self.run_after = run_after + if task_ref is not None: + self.task_ref = task_ref + if task_spec is not None: + self.task_spec = task_spec + if timeout is not None: + self.timeout = timeout + if when is not None: + self.when = when + if workspaces is not None: + self.workspaces = workspaces + + @property + def conditions(self): + """Gets the conditions of this V1beta1PipelineTask. # noqa: E501 + + Conditions is a list of conditions that need to be true for the task to run Conditions are deprecated, use WhenExpressions instead # noqa: E501 + + :return: The conditions of this V1beta1PipelineTask. # noqa: E501 + :rtype: list[V1beta1PipelineTaskCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1PipelineTask. + + Conditions is a list of conditions that need to be true for the task to run Conditions are deprecated, use WhenExpressions instead # noqa: E501 + + :param conditions: The conditions of this V1beta1PipelineTask. # noqa: E501 + :type: list[V1beta1PipelineTaskCondition] + """ + + self._conditions = conditions + + @property + def name(self): + """Gets the name of this V1beta1PipelineTask. # noqa: E501 + + Name is the name of this task within the context of a Pipeline. Name is used as a coordinate with the `from` and `runAfter` fields to establish the execution order of tasks relative to one another. # noqa: E501 + + :return: The name of this V1beta1PipelineTask. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineTask. + + Name is the name of this task within the context of a Pipeline. Name is used as a coordinate with the `from` and `runAfter` fields to establish the execution order of tasks relative to one another. # noqa: E501 + + :param name: The name of this V1beta1PipelineTask. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def params(self): + """Gets the params of this V1beta1PipelineTask. # noqa: E501 + + Parameters declares parameters passed to this task. # noqa: E501 + + :return: The params of this V1beta1PipelineTask. # noqa: E501 + :rtype: list[V1beta1Param] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1PipelineTask. + + Parameters declares parameters passed to this task. # noqa: E501 + + :param params: The params of this V1beta1PipelineTask. # noqa: E501 + :type: list[V1beta1Param] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1PipelineTask. # noqa: E501 + + + :return: The resources of this V1beta1PipelineTask. # noqa: E501 + :rtype: V1beta1PipelineTaskResources + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1PipelineTask. + + + :param resources: The resources of this V1beta1PipelineTask. # noqa: E501 + :type: V1beta1PipelineTaskResources + """ + + self._resources = resources + + @property + def retries(self): + """Gets the retries of this V1beta1PipelineTask. # noqa: E501 + + Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False # noqa: E501 + + :return: The retries of this V1beta1PipelineTask. # noqa: E501 + :rtype: int + """ + return self._retries + + @retries.setter + def retries(self, retries): + """Sets the retries of this V1beta1PipelineTask. + + Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False # noqa: E501 + + :param retries: The retries of this V1beta1PipelineTask. # noqa: E501 + :type: int + """ + + self._retries = retries + + @property + def run_after(self): + """Gets the run_after of this V1beta1PipelineTask. # noqa: E501 + + RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.) # noqa: E501 + + :return: The run_after of this V1beta1PipelineTask. # noqa: E501 + :rtype: list[str] + """ + return self._run_after + + @run_after.setter + def run_after(self, run_after): + """Sets the run_after of this V1beta1PipelineTask. + + RunAfter is the list of PipelineTask names that should be executed before this Task executes. (Used to force a specific ordering in graph execution.) # noqa: E501 + + :param run_after: The run_after of this V1beta1PipelineTask. # noqa: E501 + :type: list[str] + """ + + self._run_after = run_after + + @property + def task_ref(self): + """Gets the task_ref of this V1beta1PipelineTask. # noqa: E501 + + + :return: The task_ref of this V1beta1PipelineTask. # noqa: E501 + :rtype: V1beta1TaskRef + """ + return self._task_ref + + @task_ref.setter + def task_ref(self, task_ref): + """Sets the task_ref of this V1beta1PipelineTask. + + + :param task_ref: The task_ref of this V1beta1PipelineTask. # noqa: E501 + :type: V1beta1TaskRef + """ + + self._task_ref = task_ref + + @property + def task_spec(self): + """Gets the task_spec of this V1beta1PipelineTask. # noqa: E501 + + + :return: The task_spec of this V1beta1PipelineTask. # noqa: E501 + :rtype: V1beta1EmbeddedTask + """ + return self._task_spec + + @task_spec.setter + def task_spec(self, task_spec): + """Sets the task_spec of this V1beta1PipelineTask. + + + :param task_spec: The task_spec of this V1beta1PipelineTask. # noqa: E501 + :type: V1beta1EmbeddedTask + """ + + self._task_spec = task_spec + + @property + def timeout(self): + """Gets the timeout of this V1beta1PipelineTask. # noqa: E501 + + + :return: The timeout of this V1beta1PipelineTask. # noqa: E501 + :rtype: V1Duration + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this V1beta1PipelineTask. + + + :param timeout: The timeout of this V1beta1PipelineTask. # noqa: E501 + :type: V1Duration + """ + + self._timeout = timeout + + @property + def when(self): + """Gets the when of this V1beta1PipelineTask. # noqa: E501 + + WhenExpressions is a list of when expressions that need to be true for the task to run # noqa: E501 + + :return: The when of this V1beta1PipelineTask. # noqa: E501 + :rtype: list[V1beta1WhenExpression] + """ + return self._when + + @when.setter + def when(self, when): + """Sets the when of this V1beta1PipelineTask. + + WhenExpressions is a list of when expressions that need to be true for the task to run # noqa: E501 + + :param when: The when of this V1beta1PipelineTask. # noqa: E501 + :type: list[V1beta1WhenExpression] + """ + + self._when = when + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1PipelineTask. # noqa: E501 + + Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task. # noqa: E501 + + :return: The workspaces of this V1beta1PipelineTask. # noqa: E501 + :rtype: list[V1beta1WorkspacePipelineTaskBinding] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1PipelineTask. + + Workspaces maps workspaces from the pipeline spec to the workspaces declared in the Task. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1PipelineTask. # noqa: E501 + :type: list[V1beta1WorkspacePipelineTaskBinding] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_condition.py b/sdk/python/tekton/models/v1beta1_pipeline_task_condition.py new file mode 100644 index 000000000..2df02b857 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_condition.py @@ -0,0 +1,193 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskCondition(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'condition_ref': 'str', + 'params': 'list[V1beta1Param]', + 'resources': 'list[V1beta1PipelineTaskInputResource]' + } + + attribute_map = { + 'condition_ref': 'conditionRef', + 'params': 'params', + 'resources': 'resources' + } + + def __init__(self, condition_ref=None, params=None, resources=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskCondition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._condition_ref = None + self._params = None + self._resources = None + self.discriminator = None + + self.condition_ref = condition_ref + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + + @property + def condition_ref(self): + """Gets the condition_ref of this V1beta1PipelineTaskCondition. # noqa: E501 + + ConditionRef is the name of the Condition to use for the conditionCheck # noqa: E501 + + :return: The condition_ref of this V1beta1PipelineTaskCondition. # noqa: E501 + :rtype: str + """ + return self._condition_ref + + @condition_ref.setter + def condition_ref(self, condition_ref): + """Sets the condition_ref of this V1beta1PipelineTaskCondition. + + ConditionRef is the name of the Condition to use for the conditionCheck # noqa: E501 + + :param condition_ref: The condition_ref of this V1beta1PipelineTaskCondition. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and condition_ref is None: # noqa: E501 + raise ValueError("Invalid value for `condition_ref`, must not be `None`") # noqa: E501 + + self._condition_ref = condition_ref + + @property + def params(self): + """Gets the params of this V1beta1PipelineTaskCondition. # noqa: E501 + + Params declare parameters passed to this Condition # noqa: E501 + + :return: The params of this V1beta1PipelineTaskCondition. # noqa: E501 + :rtype: list[V1beta1Param] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1PipelineTaskCondition. + + Params declare parameters passed to this Condition # noqa: E501 + + :param params: The params of this V1beta1PipelineTaskCondition. # noqa: E501 + :type: list[V1beta1Param] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1PipelineTaskCondition. # noqa: E501 + + Resources declare the resources provided to this Condition as input # noqa: E501 + + :return: The resources of this V1beta1PipelineTaskCondition. # noqa: E501 + :rtype: list[V1beta1PipelineTaskInputResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1PipelineTaskCondition. + + Resources declare the resources provided to this Condition as input # noqa: E501 + + :param resources: The resources of this V1beta1PipelineTaskCondition. # noqa: E501 + :type: list[V1beta1PipelineTaskInputResource] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskCondition): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskCondition): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_input_resource.py b/sdk/python/tekton/models/v1beta1_pipeline_task_input_resource.py new file mode 100644 index 000000000..b47d6857d --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_input_resource.py @@ -0,0 +1,194 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskInputResource(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + '_from': 'list[str]', + 'name': 'str', + 'resource': 'str' + } + + attribute_map = { + '_from': 'from', + 'name': 'name', + 'resource': 'resource' + } + + def __init__(self, _from=None, name=None, resource=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskInputResource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self.__from = None + self._name = None + self._resource = None + self.discriminator = None + + if _from is not None: + self._from = _from + self.name = name + self.resource = resource + + @property + def _from(self): + """Gets the _from of this V1beta1PipelineTaskInputResource. # noqa: E501 + + From is the list of PipelineTask names that the resource has to come from. (Implies an ordering in the execution graph.) # noqa: E501 + + :return: The _from of this V1beta1PipelineTaskInputResource. # noqa: E501 + :rtype: list[str] + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this V1beta1PipelineTaskInputResource. + + From is the list of PipelineTask names that the resource has to come from. (Implies an ordering in the execution graph.) # noqa: E501 + + :param _from: The _from of this V1beta1PipelineTaskInputResource. # noqa: E501 + :type: list[str] + """ + + self.__from = _from + + @property + def name(self): + """Gets the name of this V1beta1PipelineTaskInputResource. # noqa: E501 + + Name is the name of the PipelineResource as declared by the Task. # noqa: E501 + + :return: The name of this V1beta1PipelineTaskInputResource. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineTaskInputResource. + + Name is the name of the PipelineResource as declared by the Task. # noqa: E501 + + :param name: The name of this V1beta1PipelineTaskInputResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def resource(self): + """Gets the resource of this V1beta1PipelineTaskInputResource. # noqa: E501 + + Resource is the name of the DeclaredPipelineResource to use. # noqa: E501 + + :return: The resource of this V1beta1PipelineTaskInputResource. # noqa: E501 + :rtype: str + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V1beta1PipelineTaskInputResource. + + Resource is the name of the DeclaredPipelineResource to use. # noqa: E501 + + :param resource: The resource of this V1beta1PipelineTaskInputResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and resource is None: # noqa: E501 + raise ValueError("Invalid value for `resource`, must not be `None`") # noqa: E501 + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskInputResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskInputResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_metadata.py b/sdk/python/tekton/models/v1beta1_pipeline_task_metadata.py new file mode 100644 index 000000000..298951fd6 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_metadata.py @@ -0,0 +1,160 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskMetadata(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'annotations': 'dict(str, str)', + 'labels': 'dict(str, str)' + } + + attribute_map = { + 'annotations': 'annotations', + 'labels': 'labels' + } + + def __init__(self, annotations=None, labels=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskMetadata - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._annotations = None + self._labels = None + self.discriminator = None + + if annotations is not None: + self.annotations = annotations + if labels is not None: + self.labels = labels + + @property + def annotations(self): + """Gets the annotations of this V1beta1PipelineTaskMetadata. # noqa: E501 + + + :return: The annotations of this V1beta1PipelineTaskMetadata. # noqa: E501 + :rtype: dict(str, str) + """ + return self._annotations + + @annotations.setter + def annotations(self, annotations): + """Sets the annotations of this V1beta1PipelineTaskMetadata. + + + :param annotations: The annotations of this V1beta1PipelineTaskMetadata. # noqa: E501 + :type: dict(str, str) + """ + + self._annotations = annotations + + @property + def labels(self): + """Gets the labels of this V1beta1PipelineTaskMetadata. # noqa: E501 + + + :return: The labels of this V1beta1PipelineTaskMetadata. # noqa: E501 + :rtype: dict(str, str) + """ + return self._labels + + @labels.setter + def labels(self, labels): + """Sets the labels of this V1beta1PipelineTaskMetadata. + + + :param labels: The labels of this V1beta1PipelineTaskMetadata. # noqa: E501 + :type: dict(str, str) + """ + + self._labels = labels + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskMetadata): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskMetadata): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_output_resource.py b/sdk/python/tekton/models/v1beta1_pipeline_task_output_resource.py new file mode 100644 index 000000000..5d631d49b --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_output_resource.py @@ -0,0 +1,166 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskOutputResource(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'resource': 'str' + } + + attribute_map = { + 'name': 'name', + 'resource': 'resource' + } + + def __init__(self, name=None, resource=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskOutputResource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._resource = None + self.discriminator = None + + self.name = name + self.resource = resource + + @property + def name(self): + """Gets the name of this V1beta1PipelineTaskOutputResource. # noqa: E501 + + Name is the name of the PipelineResource as declared by the Task. # noqa: E501 + + :return: The name of this V1beta1PipelineTaskOutputResource. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineTaskOutputResource. + + Name is the name of the PipelineResource as declared by the Task. # noqa: E501 + + :param name: The name of this V1beta1PipelineTaskOutputResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def resource(self): + """Gets the resource of this V1beta1PipelineTaskOutputResource. # noqa: E501 + + Resource is the name of the DeclaredPipelineResource to use. # noqa: E501 + + :return: The resource of this V1beta1PipelineTaskOutputResource. # noqa: E501 + :rtype: str + """ + return self._resource + + @resource.setter + def resource(self, resource): + """Sets the resource of this V1beta1PipelineTaskOutputResource. + + Resource is the name of the DeclaredPipelineResource to use. # noqa: E501 + + :param resource: The resource of this V1beta1PipelineTaskOutputResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and resource is None: # noqa: E501 + raise ValueError("Invalid value for `resource`, must not be `None`") # noqa: E501 + + self._resource = resource + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskOutputResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskOutputResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_param.py b/sdk/python/tekton/models/v1beta1_pipeline_task_param.py new file mode 100644 index 000000000..5ffe2d7bc --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_param.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskParam(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskParam - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1PipelineTaskParam. # noqa: E501 + + + :return: The name of this V1beta1PipelineTaskParam. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineTaskParam. + + + :param name: The name of this V1beta1PipelineTaskParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1PipelineTaskParam. # noqa: E501 + + + :return: The value of this V1beta1PipelineTaskParam. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1PipelineTaskParam. + + + :param value: The value of this V1beta1PipelineTaskParam. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskParam): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskParam): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_resources.py b/sdk/python/tekton/models/v1beta1_pipeline_task_resources.py new file mode 100644 index 000000000..f625e0bba --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_resources.py @@ -0,0 +1,164 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskResources(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inputs': 'list[V1beta1PipelineTaskInputResource]', + 'outputs': 'list[V1beta1PipelineTaskOutputResource]' + } + + attribute_map = { + 'inputs': 'inputs', + 'outputs': 'outputs' + } + + def __init__(self, inputs=None, outputs=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskResources - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inputs = None + self._outputs = None + self.discriminator = None + + if inputs is not None: + self.inputs = inputs + if outputs is not None: + self.outputs = outputs + + @property + def inputs(self): + """Gets the inputs of this V1beta1PipelineTaskResources. # noqa: E501 + + Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :return: The inputs of this V1beta1PipelineTaskResources. # noqa: E501 + :rtype: list[V1beta1PipelineTaskInputResource] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this V1beta1PipelineTaskResources. + + Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :param inputs: The inputs of this V1beta1PipelineTaskResources. # noqa: E501 + :type: list[V1beta1PipelineTaskInputResource] + """ + + self._inputs = inputs + + @property + def outputs(self): + """Gets the outputs of this V1beta1PipelineTaskResources. # noqa: E501 + + Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :return: The outputs of this V1beta1PipelineTaskResources. # noqa: E501 + :rtype: list[V1beta1PipelineTaskOutputResource] + """ + return self._outputs + + @outputs.setter + def outputs(self, outputs): + """Sets the outputs of this V1beta1PipelineTaskResources. + + Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :param outputs: The outputs of this V1beta1PipelineTaskResources. # noqa: E501 + :type: list[V1beta1PipelineTaskOutputResource] + """ + + self._outputs = outputs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskResources): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskResources): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_run.py b/sdk/python/tekton/models/v1beta1_pipeline_task_run.py new file mode 100644 index 000000000..f7578a9eb --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_run.py @@ -0,0 +1,134 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskRun(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskRun - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this V1beta1PipelineTaskRun. # noqa: E501 + + + :return: The name of this V1beta1PipelineTaskRun. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineTaskRun. + + + :param name: The name of this V1beta1PipelineTaskRun. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskRun): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskRun): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_task_run_spec.py b/sdk/python/tekton/models/v1beta1_pipeline_task_run_spec.py new file mode 100644 index 000000000..0d234052a --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_task_run_spec.py @@ -0,0 +1,186 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineTaskRunSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipeline_task_name': 'str', + 'task_pod_template': 'PodTemplate', + 'task_service_account_name': 'str' + } + + attribute_map = { + 'pipeline_task_name': 'pipelineTaskName', + 'task_pod_template': 'taskPodTemplate', + 'task_service_account_name': 'taskServiceAccountName' + } + + def __init__(self, pipeline_task_name=None, task_pod_template=None, task_service_account_name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineTaskRunSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipeline_task_name = None + self._task_pod_template = None + self._task_service_account_name = None + self.discriminator = None + + if pipeline_task_name is not None: + self.pipeline_task_name = pipeline_task_name + if task_pod_template is not None: + self.task_pod_template = task_pod_template + if task_service_account_name is not None: + self.task_service_account_name = task_service_account_name + + @property + def pipeline_task_name(self): + """Gets the pipeline_task_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + + + :return: The pipeline_task_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :rtype: str + """ + return self._pipeline_task_name + + @pipeline_task_name.setter + def pipeline_task_name(self, pipeline_task_name): + """Sets the pipeline_task_name of this V1beta1PipelineTaskRunSpec. + + + :param pipeline_task_name: The pipeline_task_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :type: str + """ + + self._pipeline_task_name = pipeline_task_name + + @property + def task_pod_template(self): + """Gets the task_pod_template of this V1beta1PipelineTaskRunSpec. # noqa: E501 + + + :return: The task_pod_template of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :rtype: PodTemplate + """ + return self._task_pod_template + + @task_pod_template.setter + def task_pod_template(self, task_pod_template): + """Sets the task_pod_template of this V1beta1PipelineTaskRunSpec. + + + :param task_pod_template: The task_pod_template of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :type: PodTemplate + """ + + self._task_pod_template = task_pod_template + + @property + def task_service_account_name(self): + """Gets the task_service_account_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + + + :return: The task_service_account_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :rtype: str + """ + return self._task_service_account_name + + @task_service_account_name.setter + def task_service_account_name(self, task_service_account_name): + """Sets the task_service_account_name of this V1beta1PipelineTaskRunSpec. + + + :param task_service_account_name: The task_service_account_name of this V1beta1PipelineTaskRunSpec. # noqa: E501 + :type: str + """ + + self._task_service_account_name = task_service_account_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineTaskRunSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineTaskRunSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_pipeline_workspace_declaration.py b/sdk/python/tekton/models/v1beta1_pipeline_workspace_declaration.py new file mode 100644 index 000000000..a7d9557af --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_pipeline_workspace_declaration.py @@ -0,0 +1,193 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1PipelineWorkspaceDeclaration(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'name': 'str', + 'optional': 'bool' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'optional': 'optional' + } + + def __init__(self, description=None, name=None, optional=None, local_vars_configuration=None): # noqa: E501 + """V1beta1PipelineWorkspaceDeclaration - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._name = None + self._optional = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + if optional is not None: + self.optional = optional + + @property + def description(self): + """Gets the description of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + + Description is a human readable string describing how the workspace will be used in the Pipeline. It can be useful to include a bit of detail about which tasks are intended to have access to the data on the workspace. # noqa: E501 + + :return: The description of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1PipelineWorkspaceDeclaration. + + Description is a human readable string describing how the workspace will be used in the Pipeline. It can be useful to include a bit of detail about which tasks are intended to have access to the data on the workspace. # noqa: E501 + + :param description: The description of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + + Name is the name of a workspace to be provided by a PipelineRun. # noqa: E501 + + :return: The name of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1PipelineWorkspaceDeclaration. + + Name is the name of a workspace to be provided by a PipelineRun. # noqa: E501 + + :param name: The name of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def optional(self): + """Gets the optional of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + + Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required. # noqa: E501 + + :return: The optional of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :rtype: bool + """ + return self._optional + + @optional.setter + def optional(self, optional): + """Sets the optional of this V1beta1PipelineWorkspaceDeclaration. + + Optional marks a Workspace as not being required in PipelineRuns. By default this field is false and so declared workspaces are required. # noqa: E501 + + :param optional: The optional of this V1beta1PipelineWorkspaceDeclaration. # noqa: E501 + :type: bool + """ + + self._optional = optional + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1PipelineWorkspaceDeclaration): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1PipelineWorkspaceDeclaration): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_result_ref.py b/sdk/python/tekton/models/v1beta1_result_ref.py new file mode 100644 index 000000000..b7cfa2cd0 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_result_ref.py @@ -0,0 +1,162 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1ResultRef(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pipeline_task': 'str', + 'result': 'str' + } + + attribute_map = { + 'pipeline_task': 'PipelineTask', + 'result': 'Result' + } + + def __init__(self, pipeline_task=None, result=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ResultRef - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pipeline_task = None + self._result = None + self.discriminator = None + + self.pipeline_task = pipeline_task + self.result = result + + @property + def pipeline_task(self): + """Gets the pipeline_task of this V1beta1ResultRef. # noqa: E501 + + + :return: The pipeline_task of this V1beta1ResultRef. # noqa: E501 + :rtype: str + """ + return self._pipeline_task + + @pipeline_task.setter + def pipeline_task(self, pipeline_task): + """Sets the pipeline_task of this V1beta1ResultRef. + + + :param pipeline_task: The pipeline_task of this V1beta1ResultRef. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pipeline_task is None: # noqa: E501 + raise ValueError("Invalid value for `pipeline_task`, must not be `None`") # noqa: E501 + + self._pipeline_task = pipeline_task + + @property + def result(self): + """Gets the result of this V1beta1ResultRef. # noqa: E501 + + + :return: The result of this V1beta1ResultRef. # noqa: E501 + :rtype: str + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this V1beta1ResultRef. + + + :param result: The result of this V1beta1ResultRef. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501 + raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 + + self._result = result + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ResultRef): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1ResultRef): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_sidecar.py b/sdk/python/tekton/models/v1beta1_sidecar.py new file mode 100644 index 000000000..b0d8d356f --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_sidecar.py @@ -0,0 +1,741 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1Sidecar(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'args': 'list[str]', + 'command': 'list[str]', + 'env': 'list[V1EnvVar]', + 'env_from': 'list[V1EnvFromSource]', + 'image': 'str', + 'image_pull_policy': 'str', + 'lifecycle': 'V1Lifecycle', + 'liveness_probe': 'V1Probe', + 'name': 'str', + 'ports': 'list[V1ContainerPort]', + 'readiness_probe': 'V1Probe', + 'resources': 'V1ResourceRequirements', + 'script': 'str', + 'security_context': 'V1SecurityContext', + 'startup_probe': 'V1Probe', + 'stdin': 'bool', + 'stdin_once': 'bool', + 'termination_message_path': 'str', + 'termination_message_policy': 'str', + 'tty': 'bool', + 'volume_devices': 'list[V1VolumeDevice]', + 'volume_mounts': 'list[V1VolumeMount]', + 'working_dir': 'str' + } + + attribute_map = { + 'args': 'args', + 'command': 'command', + 'env': 'env', + 'env_from': 'envFrom', + 'image': 'image', + 'image_pull_policy': 'imagePullPolicy', + 'lifecycle': 'lifecycle', + 'liveness_probe': 'livenessProbe', + 'name': 'name', + 'ports': 'ports', + 'readiness_probe': 'readinessProbe', + 'resources': 'resources', + 'script': 'script', + 'security_context': 'securityContext', + 'startup_probe': 'startupProbe', + 'stdin': 'stdin', + 'stdin_once': 'stdinOnce', + 'termination_message_path': 'terminationMessagePath', + 'termination_message_policy': 'terminationMessagePolicy', + 'tty': 'tty', + 'volume_devices': 'volumeDevices', + 'volume_mounts': 'volumeMounts', + 'working_dir': 'workingDir' + } + + def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resources=None, script=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Sidecar - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._args = None + self._command = None + self._env = None + self._env_from = None + self._image = None + self._image_pull_policy = None + self._lifecycle = None + self._liveness_probe = None + self._name = None + self._ports = None + self._readiness_probe = None + self._resources = None + self._script = None + self._security_context = None + self._startup_probe = None + self._stdin = None + self._stdin_once = None + self._termination_message_path = None + self._termination_message_policy = None + self._tty = None + self._volume_devices = None + self._volume_mounts = None + self._working_dir = None + self.discriminator = None + + if args is not None: + self.args = args + if command is not None: + self.command = command + if env is not None: + self.env = env + if env_from is not None: + self.env_from = env_from + if image is not None: + self.image = image + if image_pull_policy is not None: + self.image_pull_policy = image_pull_policy + if lifecycle is not None: + self.lifecycle = lifecycle + if liveness_probe is not None: + self.liveness_probe = liveness_probe + self.name = name + if ports is not None: + self.ports = ports + if readiness_probe is not None: + self.readiness_probe = readiness_probe + if resources is not None: + self.resources = resources + if script is not None: + self.script = script + if security_context is not None: + self.security_context = security_context + if startup_probe is not None: + self.startup_probe = startup_probe + if stdin is not None: + self.stdin = stdin + if stdin_once is not None: + self.stdin_once = stdin_once + if termination_message_path is not None: + self.termination_message_path = termination_message_path + if termination_message_policy is not None: + self.termination_message_policy = termination_message_policy + if tty is not None: + self.tty = tty + if volume_devices is not None: + self.volume_devices = volume_devices + if volume_mounts is not None: + self.volume_mounts = volume_mounts + if working_dir is not None: + self.working_dir = working_dir + + @property + def args(self): + """Gets the args of this V1beta1Sidecar. # noqa: E501 + + Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :return: The args of this V1beta1Sidecar. # noqa: E501 + :rtype: list[str] + """ + return self._args + + @args.setter + def args(self, args): + """Sets the args of this V1beta1Sidecar. + + Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :param args: The args of this V1beta1Sidecar. # noqa: E501 + :type: list[str] + """ + + self._args = args + + @property + def command(self): + """Gets the command of this V1beta1Sidecar. # noqa: E501 + + Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :return: The command of this V1beta1Sidecar. # noqa: E501 + :rtype: list[str] + """ + return self._command + + @command.setter + def command(self, command): + """Sets the command of this V1beta1Sidecar. + + Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :param command: The command of this V1beta1Sidecar. # noqa: E501 + :type: list[str] + """ + + self._command = command + + @property + def env(self): + """Gets the env of this V1beta1Sidecar. # noqa: E501 + + List of environment variables to set in the container. Cannot be updated. # noqa: E501 + + :return: The env of this V1beta1Sidecar. # noqa: E501 + :rtype: list[V1EnvVar] + """ + return self._env + + @env.setter + def env(self, env): + """Sets the env of this V1beta1Sidecar. + + List of environment variables to set in the container. Cannot be updated. # noqa: E501 + + :param env: The env of this V1beta1Sidecar. # noqa: E501 + :type: list[V1EnvVar] + """ + + self._env = env + + @property + def env_from(self): + """Gets the env_from of this V1beta1Sidecar. # noqa: E501 + + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + + :return: The env_from of this V1beta1Sidecar. # noqa: E501 + :rtype: list[V1EnvFromSource] + """ + return self._env_from + + @env_from.setter + def env_from(self, env_from): + """Sets the env_from of this V1beta1Sidecar. + + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + + :param env_from: The env_from of this V1beta1Sidecar. # noqa: E501 + :type: list[V1EnvFromSource] + """ + + self._env_from = env_from + + @property + def image(self): + """Gets the image of this V1beta1Sidecar. # noqa: E501 + + Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E501 + + :return: The image of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this V1beta1Sidecar. + + Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E501 + + :param image: The image of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def image_pull_policy(self): + """Gets the image_pull_policy of this V1beta1Sidecar. # noqa: E501 + + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # noqa: E501 + + :return: The image_pull_policy of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._image_pull_policy + + @image_pull_policy.setter + def image_pull_policy(self, image_pull_policy): + """Sets the image_pull_policy of this V1beta1Sidecar. + + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # noqa: E501 + + :param image_pull_policy: The image_pull_policy of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._image_pull_policy = image_pull_policy + + @property + def lifecycle(self): + """Gets the lifecycle of this V1beta1Sidecar. # noqa: E501 + + + :return: The lifecycle of this V1beta1Sidecar. # noqa: E501 + :rtype: V1Lifecycle + """ + return self._lifecycle + + @lifecycle.setter + def lifecycle(self, lifecycle): + """Sets the lifecycle of this V1beta1Sidecar. + + + :param lifecycle: The lifecycle of this V1beta1Sidecar. # noqa: E501 + :type: V1Lifecycle + """ + + self._lifecycle = lifecycle + + @property + def liveness_probe(self): + """Gets the liveness_probe of this V1beta1Sidecar. # noqa: E501 + + + :return: The liveness_probe of this V1beta1Sidecar. # noqa: E501 + :rtype: V1Probe + """ + return self._liveness_probe + + @liveness_probe.setter + def liveness_probe(self, liveness_probe): + """Sets the liveness_probe of this V1beta1Sidecar. + + + :param liveness_probe: The liveness_probe of this V1beta1Sidecar. # noqa: E501 + :type: V1Probe + """ + + self._liveness_probe = liveness_probe + + @property + def name(self): + """Gets the name of this V1beta1Sidecar. # noqa: E501 + + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. # noqa: E501 + + :return: The name of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1Sidecar. + + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. # noqa: E501 + + :param name: The name of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def ports(self): + """Gets the ports of this V1beta1Sidecar. # noqa: E501 + + List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. # noqa: E501 + + :return: The ports of this V1beta1Sidecar. # noqa: E501 + :rtype: list[V1ContainerPort] + """ + return self._ports + + @ports.setter + def ports(self, ports): + """Sets the ports of this V1beta1Sidecar. + + List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. # noqa: E501 + + :param ports: The ports of this V1beta1Sidecar. # noqa: E501 + :type: list[V1ContainerPort] + """ + + self._ports = ports + + @property + def readiness_probe(self): + """Gets the readiness_probe of this V1beta1Sidecar. # noqa: E501 + + + :return: The readiness_probe of this V1beta1Sidecar. # noqa: E501 + :rtype: V1Probe + """ + return self._readiness_probe + + @readiness_probe.setter + def readiness_probe(self, readiness_probe): + """Sets the readiness_probe of this V1beta1Sidecar. + + + :param readiness_probe: The readiness_probe of this V1beta1Sidecar. # noqa: E501 + :type: V1Probe + """ + + self._readiness_probe = readiness_probe + + @property + def resources(self): + """Gets the resources of this V1beta1Sidecar. # noqa: E501 + + + :return: The resources of this V1beta1Sidecar. # noqa: E501 + :rtype: V1ResourceRequirements + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1Sidecar. + + + :param resources: The resources of this V1beta1Sidecar. # noqa: E501 + :type: V1ResourceRequirements + """ + + self._resources = resources + + @property + def script(self): + """Gets the script of this V1beta1Sidecar. # noqa: E501 + + Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command or Args. # noqa: E501 + + :return: The script of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._script + + @script.setter + def script(self, script): + """Sets the script of this V1beta1Sidecar. + + Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command or Args. # noqa: E501 + + :param script: The script of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._script = script + + @property + def security_context(self): + """Gets the security_context of this V1beta1Sidecar. # noqa: E501 + + + :return: The security_context of this V1beta1Sidecar. # noqa: E501 + :rtype: V1SecurityContext + """ + return self._security_context + + @security_context.setter + def security_context(self, security_context): + """Sets the security_context of this V1beta1Sidecar. + + + :param security_context: The security_context of this V1beta1Sidecar. # noqa: E501 + :type: V1SecurityContext + """ + + self._security_context = security_context + + @property + def startup_probe(self): + """Gets the startup_probe of this V1beta1Sidecar. # noqa: E501 + + + :return: The startup_probe of this V1beta1Sidecar. # noqa: E501 + :rtype: V1Probe + """ + return self._startup_probe + + @startup_probe.setter + def startup_probe(self, startup_probe): + """Sets the startup_probe of this V1beta1Sidecar. + + + :param startup_probe: The startup_probe of this V1beta1Sidecar. # noqa: E501 + :type: V1Probe + """ + + self._startup_probe = startup_probe + + @property + def stdin(self): + """Gets the stdin of this V1beta1Sidecar. # noqa: E501 + + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. # noqa: E501 + + :return: The stdin of this V1beta1Sidecar. # noqa: E501 + :rtype: bool + """ + return self._stdin + + @stdin.setter + def stdin(self, stdin): + """Sets the stdin of this V1beta1Sidecar. + + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. # noqa: E501 + + :param stdin: The stdin of this V1beta1Sidecar. # noqa: E501 + :type: bool + """ + + self._stdin = stdin + + @property + def stdin_once(self): + """Gets the stdin_once of this V1beta1Sidecar. # noqa: E501 + + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false # noqa: E501 + + :return: The stdin_once of this V1beta1Sidecar. # noqa: E501 + :rtype: bool + """ + return self._stdin_once + + @stdin_once.setter + def stdin_once(self, stdin_once): + """Sets the stdin_once of this V1beta1Sidecar. + + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false # noqa: E501 + + :param stdin_once: The stdin_once of this V1beta1Sidecar. # noqa: E501 + :type: bool + """ + + self._stdin_once = stdin_once + + @property + def termination_message_path(self): + """Gets the termination_message_path of this V1beta1Sidecar. # noqa: E501 + + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. # noqa: E501 + + :return: The termination_message_path of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._termination_message_path + + @termination_message_path.setter + def termination_message_path(self, termination_message_path): + """Sets the termination_message_path of this V1beta1Sidecar. + + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. # noqa: E501 + + :param termination_message_path: The termination_message_path of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._termination_message_path = termination_message_path + + @property + def termination_message_policy(self): + """Gets the termination_message_policy of this V1beta1Sidecar. # noqa: E501 + + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. # noqa: E501 + + :return: The termination_message_policy of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._termination_message_policy + + @termination_message_policy.setter + def termination_message_policy(self, termination_message_policy): + """Sets the termination_message_policy of this V1beta1Sidecar. + + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. # noqa: E501 + + :param termination_message_policy: The termination_message_policy of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._termination_message_policy = termination_message_policy + + @property + def tty(self): + """Gets the tty of this V1beta1Sidecar. # noqa: E501 + + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. # noqa: E501 + + :return: The tty of this V1beta1Sidecar. # noqa: E501 + :rtype: bool + """ + return self._tty + + @tty.setter + def tty(self, tty): + """Sets the tty of this V1beta1Sidecar. + + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. # noqa: E501 + + :param tty: The tty of this V1beta1Sidecar. # noqa: E501 + :type: bool + """ + + self._tty = tty + + @property + def volume_devices(self): + """Gets the volume_devices of this V1beta1Sidecar. # noqa: E501 + + volumeDevices is the list of block devices to be used by the container. # noqa: E501 + + :return: The volume_devices of this V1beta1Sidecar. # noqa: E501 + :rtype: list[V1VolumeDevice] + """ + return self._volume_devices + + @volume_devices.setter + def volume_devices(self, volume_devices): + """Sets the volume_devices of this V1beta1Sidecar. + + volumeDevices is the list of block devices to be used by the container. # noqa: E501 + + :param volume_devices: The volume_devices of this V1beta1Sidecar. # noqa: E501 + :type: list[V1VolumeDevice] + """ + + self._volume_devices = volume_devices + + @property + def volume_mounts(self): + """Gets the volume_mounts of this V1beta1Sidecar. # noqa: E501 + + Pod volumes to mount into the container's filesystem. Cannot be updated. # noqa: E501 + + :return: The volume_mounts of this V1beta1Sidecar. # noqa: E501 + :rtype: list[V1VolumeMount] + """ + return self._volume_mounts + + @volume_mounts.setter + def volume_mounts(self, volume_mounts): + """Sets the volume_mounts of this V1beta1Sidecar. + + Pod volumes to mount into the container's filesystem. Cannot be updated. # noqa: E501 + + :param volume_mounts: The volume_mounts of this V1beta1Sidecar. # noqa: E501 + :type: list[V1VolumeMount] + """ + + self._volume_mounts = volume_mounts + + @property + def working_dir(self): + """Gets the working_dir of this V1beta1Sidecar. # noqa: E501 + + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. # noqa: E501 + + :return: The working_dir of this V1beta1Sidecar. # noqa: E501 + :rtype: str + """ + return self._working_dir + + @working_dir.setter + def working_dir(self, working_dir): + """Sets the working_dir of this V1beta1Sidecar. + + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. # noqa: E501 + + :param working_dir: The working_dir of this V1beta1Sidecar. # noqa: E501 + :type: str + """ + + self._working_dir = working_dir + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Sidecar): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1Sidecar): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_sidecar_state.py b/sdk/python/tekton/models/v1beta1_sidecar_state.py new file mode 100644 index 000000000..ee3e0970b --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_sidecar_state.py @@ -0,0 +1,264 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1SidecarState(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'container': 'str', + 'image_id': 'str', + 'name': 'str', + 'running': 'V1ContainerStateRunning', + 'terminated': 'V1ContainerStateTerminated', + 'waiting': 'V1ContainerStateWaiting' + } + + attribute_map = { + 'container': 'container', + 'image_id': 'imageID', + 'name': 'name', + 'running': 'running', + 'terminated': 'terminated', + 'waiting': 'waiting' + } + + def __init__(self, container=None, image_id=None, name=None, running=None, terminated=None, waiting=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SidecarState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._container = None + self._image_id = None + self._name = None + self._running = None + self._terminated = None + self._waiting = None + self.discriminator = None + + if container is not None: + self.container = container + if image_id is not None: + self.image_id = image_id + if name is not None: + self.name = name + if running is not None: + self.running = running + if terminated is not None: + self.terminated = terminated + if waiting is not None: + self.waiting = waiting + + @property + def container(self): + """Gets the container of this V1beta1SidecarState. # noqa: E501 + + + :return: The container of this V1beta1SidecarState. # noqa: E501 + :rtype: str + """ + return self._container + + @container.setter + def container(self, container): + """Sets the container of this V1beta1SidecarState. + + + :param container: The container of this V1beta1SidecarState. # noqa: E501 + :type: str + """ + + self._container = container + + @property + def image_id(self): + """Gets the image_id of this V1beta1SidecarState. # noqa: E501 + + + :return: The image_id of this V1beta1SidecarState. # noqa: E501 + :rtype: str + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """Sets the image_id of this V1beta1SidecarState. + + + :param image_id: The image_id of this V1beta1SidecarState. # noqa: E501 + :type: str + """ + + self._image_id = image_id + + @property + def name(self): + """Gets the name of this V1beta1SidecarState. # noqa: E501 + + + :return: The name of this V1beta1SidecarState. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1SidecarState. + + + :param name: The name of this V1beta1SidecarState. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def running(self): + """Gets the running of this V1beta1SidecarState. # noqa: E501 + + + :return: The running of this V1beta1SidecarState. # noqa: E501 + :rtype: V1ContainerStateRunning + """ + return self._running + + @running.setter + def running(self, running): + """Sets the running of this V1beta1SidecarState. + + + :param running: The running of this V1beta1SidecarState. # noqa: E501 + :type: V1ContainerStateRunning + """ + + self._running = running + + @property + def terminated(self): + """Gets the terminated of this V1beta1SidecarState. # noqa: E501 + + + :return: The terminated of this V1beta1SidecarState. # noqa: E501 + :rtype: V1ContainerStateTerminated + """ + return self._terminated + + @terminated.setter + def terminated(self, terminated): + """Sets the terminated of this V1beta1SidecarState. + + + :param terminated: The terminated of this V1beta1SidecarState. # noqa: E501 + :type: V1ContainerStateTerminated + """ + + self._terminated = terminated + + @property + def waiting(self): + """Gets the waiting of this V1beta1SidecarState. # noqa: E501 + + + :return: The waiting of this V1beta1SidecarState. # noqa: E501 + :rtype: V1ContainerStateWaiting + """ + return self._waiting + + @waiting.setter + def waiting(self, waiting): + """Sets the waiting of this V1beta1SidecarState. + + + :param waiting: The waiting of this V1beta1SidecarState. # noqa: E501 + :type: V1ContainerStateWaiting + """ + + self._waiting = waiting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SidecarState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1SidecarState): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_skipped_task.py b/sdk/python/tekton/models/v1beta1_skipped_task.py new file mode 100644 index 000000000..e1007f433 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_skipped_task.py @@ -0,0 +1,165 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1SkippedTask(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'when_expressions': 'list[V1beta1WhenExpression]' + } + + attribute_map = { + 'name': 'name', + 'when_expressions': 'whenExpressions' + } + + def __init__(self, name=None, when_expressions=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SkippedTask - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._when_expressions = None + self.discriminator = None + + self.name = name + if when_expressions is not None: + self.when_expressions = when_expressions + + @property + def name(self): + """Gets the name of this V1beta1SkippedTask. # noqa: E501 + + Name is the Pipeline Task name # noqa: E501 + + :return: The name of this V1beta1SkippedTask. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1SkippedTask. + + Name is the Pipeline Task name # noqa: E501 + + :param name: The name of this V1beta1SkippedTask. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def when_expressions(self): + """Gets the when_expressions of this V1beta1SkippedTask. # noqa: E501 + + WhenExpressions is the list of checks guarding the execution of the PipelineTask # noqa: E501 + + :return: The when_expressions of this V1beta1SkippedTask. # noqa: E501 + :rtype: list[V1beta1WhenExpression] + """ + return self._when_expressions + + @when_expressions.setter + def when_expressions(self, when_expressions): + """Sets the when_expressions of this V1beta1SkippedTask. + + WhenExpressions is the list of checks guarding the execution of the PipelineTask # noqa: E501 + + :param when_expressions: The when_expressions of this V1beta1SkippedTask. # noqa: E501 + :type: list[V1beta1WhenExpression] + """ + + self._when_expressions = when_expressions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SkippedTask): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1SkippedTask): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_step.py b/sdk/python/tekton/models/v1beta1_step.py new file mode 100644 index 000000000..d8a9276e0 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_step.py @@ -0,0 +1,767 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1Step(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'args': 'list[str]', + 'command': 'list[str]', + 'env': 'list[V1EnvVar]', + 'env_from': 'list[V1EnvFromSource]', + 'image': 'str', + 'image_pull_policy': 'str', + 'lifecycle': 'V1Lifecycle', + 'liveness_probe': 'V1Probe', + 'name': 'str', + 'ports': 'list[V1ContainerPort]', + 'readiness_probe': 'V1Probe', + 'resources': 'V1ResourceRequirements', + 'script': 'str', + 'security_context': 'V1SecurityContext', + 'startup_probe': 'V1Probe', + 'stdin': 'bool', + 'stdin_once': 'bool', + 'termination_message_path': 'str', + 'termination_message_policy': 'str', + 'timeout': 'V1Duration', + 'tty': 'bool', + 'volume_devices': 'list[V1VolumeDevice]', + 'volume_mounts': 'list[V1VolumeMount]', + 'working_dir': 'str' + } + + attribute_map = { + 'args': 'args', + 'command': 'command', + 'env': 'env', + 'env_from': 'envFrom', + 'image': 'image', + 'image_pull_policy': 'imagePullPolicy', + 'lifecycle': 'lifecycle', + 'liveness_probe': 'livenessProbe', + 'name': 'name', + 'ports': 'ports', + 'readiness_probe': 'readinessProbe', + 'resources': 'resources', + 'script': 'script', + 'security_context': 'securityContext', + 'startup_probe': 'startupProbe', + 'stdin': 'stdin', + 'stdin_once': 'stdinOnce', + 'termination_message_path': 'terminationMessagePath', + 'termination_message_policy': 'terminationMessagePolicy', + 'timeout': 'timeout', + 'tty': 'tty', + 'volume_devices': 'volumeDevices', + 'volume_mounts': 'volumeMounts', + 'working_dir': 'workingDir' + } + + def __init__(self, args=None, command=None, env=None, env_from=None, image=None, image_pull_policy=None, lifecycle=None, liveness_probe=None, name=None, ports=None, readiness_probe=None, resources=None, script=None, security_context=None, startup_probe=None, stdin=None, stdin_once=None, termination_message_path=None, termination_message_policy=None, timeout=None, tty=None, volume_devices=None, volume_mounts=None, working_dir=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Step - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._args = None + self._command = None + self._env = None + self._env_from = None + self._image = None + self._image_pull_policy = None + self._lifecycle = None + self._liveness_probe = None + self._name = None + self._ports = None + self._readiness_probe = None + self._resources = None + self._script = None + self._security_context = None + self._startup_probe = None + self._stdin = None + self._stdin_once = None + self._termination_message_path = None + self._termination_message_policy = None + self._timeout = None + self._tty = None + self._volume_devices = None + self._volume_mounts = None + self._working_dir = None + self.discriminator = None + + if args is not None: + self.args = args + if command is not None: + self.command = command + if env is not None: + self.env = env + if env_from is not None: + self.env_from = env_from + if image is not None: + self.image = image + if image_pull_policy is not None: + self.image_pull_policy = image_pull_policy + if lifecycle is not None: + self.lifecycle = lifecycle + if liveness_probe is not None: + self.liveness_probe = liveness_probe + self.name = name + if ports is not None: + self.ports = ports + if readiness_probe is not None: + self.readiness_probe = readiness_probe + if resources is not None: + self.resources = resources + if script is not None: + self.script = script + if security_context is not None: + self.security_context = security_context + if startup_probe is not None: + self.startup_probe = startup_probe + if stdin is not None: + self.stdin = stdin + if stdin_once is not None: + self.stdin_once = stdin_once + if termination_message_path is not None: + self.termination_message_path = termination_message_path + if termination_message_policy is not None: + self.termination_message_policy = termination_message_policy + if timeout is not None: + self.timeout = timeout + if tty is not None: + self.tty = tty + if volume_devices is not None: + self.volume_devices = volume_devices + if volume_mounts is not None: + self.volume_mounts = volume_mounts + if working_dir is not None: + self.working_dir = working_dir + + @property + def args(self): + """Gets the args of this V1beta1Step. # noqa: E501 + + Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :return: The args of this V1beta1Step. # noqa: E501 + :rtype: list[str] + """ + return self._args + + @args.setter + def args(self, args): + """Sets the args of this V1beta1Step. + + Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :param args: The args of this V1beta1Step. # noqa: E501 + :type: list[str] + """ + + self._args = args + + @property + def command(self): + """Gets the command of this V1beta1Step. # noqa: E501 + + Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :return: The command of this V1beta1Step. # noqa: E501 + :rtype: list[str] + """ + return self._command + + @command.setter + def command(self, command): + """Sets the command of this V1beta1Step. + + Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell # noqa: E501 + + :param command: The command of this V1beta1Step. # noqa: E501 + :type: list[str] + """ + + self._command = command + + @property + def env(self): + """Gets the env of this V1beta1Step. # noqa: E501 + + List of environment variables to set in the container. Cannot be updated. # noqa: E501 + + :return: The env of this V1beta1Step. # noqa: E501 + :rtype: list[V1EnvVar] + """ + return self._env + + @env.setter + def env(self, env): + """Sets the env of this V1beta1Step. + + List of environment variables to set in the container. Cannot be updated. # noqa: E501 + + :param env: The env of this V1beta1Step. # noqa: E501 + :type: list[V1EnvVar] + """ + + self._env = env + + @property + def env_from(self): + """Gets the env_from of this V1beta1Step. # noqa: E501 + + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + + :return: The env_from of this V1beta1Step. # noqa: E501 + :rtype: list[V1EnvFromSource] + """ + return self._env_from + + @env_from.setter + def env_from(self, env_from): + """Sets the env_from of this V1beta1Step. + + List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. # noqa: E501 + + :param env_from: The env_from of this V1beta1Step. # noqa: E501 + :type: list[V1EnvFromSource] + """ + + self._env_from = env_from + + @property + def image(self): + """Gets the image of this V1beta1Step. # noqa: E501 + + Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E501 + + :return: The image of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this V1beta1Step. + + Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. # noqa: E501 + + :param image: The image of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._image = image + + @property + def image_pull_policy(self): + """Gets the image_pull_policy of this V1beta1Step. # noqa: E501 + + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # noqa: E501 + + :return: The image_pull_policy of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._image_pull_policy + + @image_pull_policy.setter + def image_pull_policy(self, image_pull_policy): + """Sets the image_pull_policy of this V1beta1Step. + + Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images # noqa: E501 + + :param image_pull_policy: The image_pull_policy of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._image_pull_policy = image_pull_policy + + @property + def lifecycle(self): + """Gets the lifecycle of this V1beta1Step. # noqa: E501 + + + :return: The lifecycle of this V1beta1Step. # noqa: E501 + :rtype: V1Lifecycle + """ + return self._lifecycle + + @lifecycle.setter + def lifecycle(self, lifecycle): + """Sets the lifecycle of this V1beta1Step. + + + :param lifecycle: The lifecycle of this V1beta1Step. # noqa: E501 + :type: V1Lifecycle + """ + + self._lifecycle = lifecycle + + @property + def liveness_probe(self): + """Gets the liveness_probe of this V1beta1Step. # noqa: E501 + + + :return: The liveness_probe of this V1beta1Step. # noqa: E501 + :rtype: V1Probe + """ + return self._liveness_probe + + @liveness_probe.setter + def liveness_probe(self, liveness_probe): + """Sets the liveness_probe of this V1beta1Step. + + + :param liveness_probe: The liveness_probe of this V1beta1Step. # noqa: E501 + :type: V1Probe + """ + + self._liveness_probe = liveness_probe + + @property + def name(self): + """Gets the name of this V1beta1Step. # noqa: E501 + + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. # noqa: E501 + + :return: The name of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1Step. + + Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. # noqa: E501 + + :param name: The name of this V1beta1Step. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def ports(self): + """Gets the ports of this V1beta1Step. # noqa: E501 + + List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. # noqa: E501 + + :return: The ports of this V1beta1Step. # noqa: E501 + :rtype: list[V1ContainerPort] + """ + return self._ports + + @ports.setter + def ports(self, ports): + """Sets the ports of this V1beta1Step. + + List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated. # noqa: E501 + + :param ports: The ports of this V1beta1Step. # noqa: E501 + :type: list[V1ContainerPort] + """ + + self._ports = ports + + @property + def readiness_probe(self): + """Gets the readiness_probe of this V1beta1Step. # noqa: E501 + + + :return: The readiness_probe of this V1beta1Step. # noqa: E501 + :rtype: V1Probe + """ + return self._readiness_probe + + @readiness_probe.setter + def readiness_probe(self, readiness_probe): + """Sets the readiness_probe of this V1beta1Step. + + + :param readiness_probe: The readiness_probe of this V1beta1Step. # noqa: E501 + :type: V1Probe + """ + + self._readiness_probe = readiness_probe + + @property + def resources(self): + """Gets the resources of this V1beta1Step. # noqa: E501 + + + :return: The resources of this V1beta1Step. # noqa: E501 + :rtype: V1ResourceRequirements + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1Step. + + + :param resources: The resources of this V1beta1Step. # noqa: E501 + :type: V1ResourceRequirements + """ + + self._resources = resources + + @property + def script(self): + """Gets the script of this V1beta1Step. # noqa: E501 + + Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command and the Args will be passed to the Script. # noqa: E501 + + :return: The script of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._script + + @script.setter + def script(self, script): + """Sets the script of this V1beta1Step. + + Script is the contents of an executable file to execute. If Script is not empty, the Step cannot have an Command and the Args will be passed to the Script. # noqa: E501 + + :param script: The script of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._script = script + + @property + def security_context(self): + """Gets the security_context of this V1beta1Step. # noqa: E501 + + + :return: The security_context of this V1beta1Step. # noqa: E501 + :rtype: V1SecurityContext + """ + return self._security_context + + @security_context.setter + def security_context(self, security_context): + """Sets the security_context of this V1beta1Step. + + + :param security_context: The security_context of this V1beta1Step. # noqa: E501 + :type: V1SecurityContext + """ + + self._security_context = security_context + + @property + def startup_probe(self): + """Gets the startup_probe of this V1beta1Step. # noqa: E501 + + + :return: The startup_probe of this V1beta1Step. # noqa: E501 + :rtype: V1Probe + """ + return self._startup_probe + + @startup_probe.setter + def startup_probe(self, startup_probe): + """Sets the startup_probe of this V1beta1Step. + + + :param startup_probe: The startup_probe of this V1beta1Step. # noqa: E501 + :type: V1Probe + """ + + self._startup_probe = startup_probe + + @property + def stdin(self): + """Gets the stdin of this V1beta1Step. # noqa: E501 + + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. # noqa: E501 + + :return: The stdin of this V1beta1Step. # noqa: E501 + :rtype: bool + """ + return self._stdin + + @stdin.setter + def stdin(self, stdin): + """Sets the stdin of this V1beta1Step. + + Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. # noqa: E501 + + :param stdin: The stdin of this V1beta1Step. # noqa: E501 + :type: bool + """ + + self._stdin = stdin + + @property + def stdin_once(self): + """Gets the stdin_once of this V1beta1Step. # noqa: E501 + + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false # noqa: E501 + + :return: The stdin_once of this V1beta1Step. # noqa: E501 + :rtype: bool + """ + return self._stdin_once + + @stdin_once.setter + def stdin_once(self, stdin_once): + """Sets the stdin_once of this V1beta1Step. + + Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false # noqa: E501 + + :param stdin_once: The stdin_once of this V1beta1Step. # noqa: E501 + :type: bool + """ + + self._stdin_once = stdin_once + + @property + def termination_message_path(self): + """Gets the termination_message_path of this V1beta1Step. # noqa: E501 + + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. # noqa: E501 + + :return: The termination_message_path of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._termination_message_path + + @termination_message_path.setter + def termination_message_path(self, termination_message_path): + """Sets the termination_message_path of this V1beta1Step. + + Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. # noqa: E501 + + :param termination_message_path: The termination_message_path of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._termination_message_path = termination_message_path + + @property + def termination_message_policy(self): + """Gets the termination_message_policy of this V1beta1Step. # noqa: E501 + + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. # noqa: E501 + + :return: The termination_message_policy of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._termination_message_policy + + @termination_message_policy.setter + def termination_message_policy(self, termination_message_policy): + """Sets the termination_message_policy of this V1beta1Step. + + Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. # noqa: E501 + + :param termination_message_policy: The termination_message_policy of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._termination_message_policy = termination_message_policy + + @property + def timeout(self): + """Gets the timeout of this V1beta1Step. # noqa: E501 + + + :return: The timeout of this V1beta1Step. # noqa: E501 + :rtype: V1Duration + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this V1beta1Step. + + + :param timeout: The timeout of this V1beta1Step. # noqa: E501 + :type: V1Duration + """ + + self._timeout = timeout + + @property + def tty(self): + """Gets the tty of this V1beta1Step. # noqa: E501 + + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. # noqa: E501 + + :return: The tty of this V1beta1Step. # noqa: E501 + :rtype: bool + """ + return self._tty + + @tty.setter + def tty(self, tty): + """Sets the tty of this V1beta1Step. + + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. # noqa: E501 + + :param tty: The tty of this V1beta1Step. # noqa: E501 + :type: bool + """ + + self._tty = tty + + @property + def volume_devices(self): + """Gets the volume_devices of this V1beta1Step. # noqa: E501 + + volumeDevices is the list of block devices to be used by the container. # noqa: E501 + + :return: The volume_devices of this V1beta1Step. # noqa: E501 + :rtype: list[V1VolumeDevice] + """ + return self._volume_devices + + @volume_devices.setter + def volume_devices(self, volume_devices): + """Sets the volume_devices of this V1beta1Step. + + volumeDevices is the list of block devices to be used by the container. # noqa: E501 + + :param volume_devices: The volume_devices of this V1beta1Step. # noqa: E501 + :type: list[V1VolumeDevice] + """ + + self._volume_devices = volume_devices + + @property + def volume_mounts(self): + """Gets the volume_mounts of this V1beta1Step. # noqa: E501 + + Pod volumes to mount into the container's filesystem. Cannot be updated. # noqa: E501 + + :return: The volume_mounts of this V1beta1Step. # noqa: E501 + :rtype: list[V1VolumeMount] + """ + return self._volume_mounts + + @volume_mounts.setter + def volume_mounts(self, volume_mounts): + """Sets the volume_mounts of this V1beta1Step. + + Pod volumes to mount into the container's filesystem. Cannot be updated. # noqa: E501 + + :param volume_mounts: The volume_mounts of this V1beta1Step. # noqa: E501 + :type: list[V1VolumeMount] + """ + + self._volume_mounts = volume_mounts + + @property + def working_dir(self): + """Gets the working_dir of this V1beta1Step. # noqa: E501 + + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. # noqa: E501 + + :return: The working_dir of this V1beta1Step. # noqa: E501 + :rtype: str + """ + return self._working_dir + + @working_dir.setter + def working_dir(self, working_dir): + """Sets the working_dir of this V1beta1Step. + + Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. # noqa: E501 + + :param working_dir: The working_dir of this V1beta1Step. # noqa: E501 + :type: str + """ + + self._working_dir = working_dir + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Step): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1Step): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_step_state.py b/sdk/python/tekton/models/v1beta1_step_state.py new file mode 100644 index 000000000..ea1df99e8 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_step_state.py @@ -0,0 +1,264 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1StepState(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'container': 'str', + 'image_id': 'str', + 'name': 'str', + 'running': 'V1ContainerStateRunning', + 'terminated': 'V1ContainerStateTerminated', + 'waiting': 'V1ContainerStateWaiting' + } + + attribute_map = { + 'container': 'container', + 'image_id': 'imageID', + 'name': 'name', + 'running': 'running', + 'terminated': 'terminated', + 'waiting': 'waiting' + } + + def __init__(self, container=None, image_id=None, name=None, running=None, terminated=None, waiting=None, local_vars_configuration=None): # noqa: E501 + """V1beta1StepState - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._container = None + self._image_id = None + self._name = None + self._running = None + self._terminated = None + self._waiting = None + self.discriminator = None + + if container is not None: + self.container = container + if image_id is not None: + self.image_id = image_id + if name is not None: + self.name = name + if running is not None: + self.running = running + if terminated is not None: + self.terminated = terminated + if waiting is not None: + self.waiting = waiting + + @property + def container(self): + """Gets the container of this V1beta1StepState. # noqa: E501 + + + :return: The container of this V1beta1StepState. # noqa: E501 + :rtype: str + """ + return self._container + + @container.setter + def container(self, container): + """Sets the container of this V1beta1StepState. + + + :param container: The container of this V1beta1StepState. # noqa: E501 + :type: str + """ + + self._container = container + + @property + def image_id(self): + """Gets the image_id of this V1beta1StepState. # noqa: E501 + + + :return: The image_id of this V1beta1StepState. # noqa: E501 + :rtype: str + """ + return self._image_id + + @image_id.setter + def image_id(self, image_id): + """Sets the image_id of this V1beta1StepState. + + + :param image_id: The image_id of this V1beta1StepState. # noqa: E501 + :type: str + """ + + self._image_id = image_id + + @property + def name(self): + """Gets the name of this V1beta1StepState. # noqa: E501 + + + :return: The name of this V1beta1StepState. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1StepState. + + + :param name: The name of this V1beta1StepState. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def running(self): + """Gets the running of this V1beta1StepState. # noqa: E501 + + + :return: The running of this V1beta1StepState. # noqa: E501 + :rtype: V1ContainerStateRunning + """ + return self._running + + @running.setter + def running(self, running): + """Sets the running of this V1beta1StepState. + + + :param running: The running of this V1beta1StepState. # noqa: E501 + :type: V1ContainerStateRunning + """ + + self._running = running + + @property + def terminated(self): + """Gets the terminated of this V1beta1StepState. # noqa: E501 + + + :return: The terminated of this V1beta1StepState. # noqa: E501 + :rtype: V1ContainerStateTerminated + """ + return self._terminated + + @terminated.setter + def terminated(self, terminated): + """Sets the terminated of this V1beta1StepState. + + + :param terminated: The terminated of this V1beta1StepState. # noqa: E501 + :type: V1ContainerStateTerminated + """ + + self._terminated = terminated + + @property + def waiting(self): + """Gets the waiting of this V1beta1StepState. # noqa: E501 + + + :return: The waiting of this V1beta1StepState. # noqa: E501 + :rtype: V1ContainerStateWaiting + """ + return self._waiting + + @waiting.setter + def waiting(self, waiting): + """Sets the waiting of this V1beta1StepState. + + + :param waiting: The waiting of this V1beta1StepState. # noqa: E501 + :type: V1ContainerStateWaiting + """ + + self._waiting = waiting + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1StepState): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1StepState): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task.py b/sdk/python/tekton/models/v1beta1_task.py new file mode 100644 index 000000000..de634348f --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task.py @@ -0,0 +1,216 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1Task(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1TaskSpec' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Task - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + + @property + def api_version(self): + """Gets the api_version of this V1beta1Task. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1Task. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1Task. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1Task. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1Task. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1Task. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1Task. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1Task. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1Task. # noqa: E501 + + + :return: The metadata of this V1beta1Task. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1Task. + + + :param metadata: The metadata of this V1beta1Task. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1Task. # noqa: E501 + + + :return: The spec of this V1beta1Task. # noqa: E501 + :rtype: V1beta1TaskSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1Task. + + + :param spec: The spec of this V1beta1Task. # noqa: E501 + :type: V1beta1TaskSpec + """ + + self._spec = spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Task): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1Task): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_list.py b/sdk/python/tekton/models/v1beta1_task_list.py new file mode 100644 index 000000000..36e22a9aa --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_list.py @@ -0,0 +1,217 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1beta1Task]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1TaskList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1TaskList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1TaskList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1TaskList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1TaskList. # noqa: E501 + + + :return: The items of this V1beta1TaskList. # noqa: E501 + :rtype: list[V1beta1Task] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1TaskList. + + + :param items: The items of this V1beta1TaskList. # noqa: E501 + :type: list[V1beta1Task] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1TaskList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1TaskList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1TaskList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1TaskList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1TaskList. # noqa: E501 + + + :return: The metadata of this V1beta1TaskList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1TaskList. + + + :param metadata: The metadata of this V1beta1TaskList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_ref.py b/sdk/python/tekton/models/v1beta1_task_ref.py new file mode 100644 index 000000000..3144cf4e1 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_ref.py @@ -0,0 +1,220 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRef(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'bundle': 'str', + 'kind': 'str', + 'name': 'str' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'bundle': 'bundle', + 'kind': 'kind', + 'name': 'name' + } + + def __init__(self, api_version=None, bundle=None, kind=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRef - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._bundle = None + self._kind = None + self._name = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if bundle is not None: + self.bundle = bundle + if kind is not None: + self.kind = kind + if name is not None: + self.name = name + + @property + def api_version(self): + """Gets the api_version of this V1beta1TaskRef. # noqa: E501 + + API version of the referent # noqa: E501 + + :return: The api_version of this V1beta1TaskRef. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1TaskRef. + + API version of the referent # noqa: E501 + + :param api_version: The api_version of this V1beta1TaskRef. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def bundle(self): + """Gets the bundle of this V1beta1TaskRef. # noqa: E501 + + Bundle url reference to a Tekton Bundle. # noqa: E501 + + :return: The bundle of this V1beta1TaskRef. # noqa: E501 + :rtype: str + """ + return self._bundle + + @bundle.setter + def bundle(self, bundle): + """Sets the bundle of this V1beta1TaskRef. + + Bundle url reference to a Tekton Bundle. # noqa: E501 + + :param bundle: The bundle of this V1beta1TaskRef. # noqa: E501 + :type: str + """ + + self._bundle = bundle + + @property + def kind(self): + """Gets the kind of this V1beta1TaskRef. # noqa: E501 + + TaskKind indicates the kind of the task, namespaced or cluster scoped. # noqa: E501 + + :return: The kind of this V1beta1TaskRef. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1TaskRef. + + TaskKind indicates the kind of the task, namespaced or cluster scoped. # noqa: E501 + + :param kind: The kind of this V1beta1TaskRef. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def name(self): + """Gets the name of this V1beta1TaskRef. # noqa: E501 + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :return: The name of this V1beta1TaskRef. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TaskRef. + + Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names # noqa: E501 + + :param name: The name of this V1beta1TaskRef. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRef): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRef): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_resource.py b/sdk/python/tekton/models/v1beta1_task_resource.py new file mode 100644 index 000000000..32e319f3f --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_resource.py @@ -0,0 +1,250 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskResource(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'name': 'str', + 'optional': 'bool', + 'target_path': 'str', + 'type': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'optional': 'optional', + 'target_path': 'targetPath', + 'type': 'type' + } + + def __init__(self, description=None, name=None, optional=None, target_path=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskResource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._name = None + self._optional = None + self._target_path = None + self._type = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + if optional is not None: + self.optional = optional + if target_path is not None: + self.target_path = target_path + self.type = type + + @property + def description(self): + """Gets the description of this V1beta1TaskResource. # noqa: E501 + + Description is a user-facing description of the declared resource that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1beta1TaskResource. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1TaskResource. + + Description is a user-facing description of the declared resource that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1beta1TaskResource. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1TaskResource. # noqa: E501 + + Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. # noqa: E501 + + :return: The name of this V1beta1TaskResource. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TaskResource. + + Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps. # noqa: E501 + + :param name: The name of this V1beta1TaskResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def optional(self): + """Gets the optional of this V1beta1TaskResource. # noqa: E501 + + Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) # noqa: E501 + + :return: The optional of this V1beta1TaskResource. # noqa: E501 + :rtype: bool + """ + return self._optional + + @optional.setter + def optional(self, optional): + """Sets the optional of this V1beta1TaskResource. + + Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it) # noqa: E501 + + :param optional: The optional of this V1beta1TaskResource. # noqa: E501 + :type: bool + """ + + self._optional = optional + + @property + def target_path(self): + """Gets the target_path of this V1beta1TaskResource. # noqa: E501 + + TargetPath is the path in workspace directory where the resource will be copied. # noqa: E501 + + :return: The target_path of this V1beta1TaskResource. # noqa: E501 + :rtype: str + """ + return self._target_path + + @target_path.setter + def target_path(self, target_path): + """Sets the target_path of this V1beta1TaskResource. + + TargetPath is the path in workspace directory where the resource will be copied. # noqa: E501 + + :param target_path: The target_path of this V1beta1TaskResource. # noqa: E501 + :type: str + """ + + self._target_path = target_path + + @property + def type(self): + """Gets the type of this V1beta1TaskResource. # noqa: E501 + + Type is the type of this resource; # noqa: E501 + + :return: The type of this V1beta1TaskResource. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1TaskResource. + + Type is the type of this resource; # noqa: E501 + + :param type: The type of this V1beta1TaskResource. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskResource): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskResource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_resource_binding.py b/sdk/python/tekton/models/v1beta1_task_resource_binding.py new file mode 100644 index 000000000..c1e3906d2 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_resource_binding.py @@ -0,0 +1,216 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskResourceBinding(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'paths': 'list[str]', + 'resource_ref': 'V1beta1PipelineResourceRef', + 'resource_spec': 'V1alpha1PipelineResourceSpec' + } + + attribute_map = { + 'name': 'name', + 'paths': 'paths', + 'resource_ref': 'resourceRef', + 'resource_spec': 'resourceSpec' + } + + def __init__(self, name=None, paths=None, resource_ref=None, resource_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskResourceBinding - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._paths = None + self._resource_ref = None + self._resource_spec = None + self.discriminator = None + + if name is not None: + self.name = name + if paths is not None: + self.paths = paths + if resource_ref is not None: + self.resource_ref = resource_ref + if resource_spec is not None: + self.resource_spec = resource_spec + + @property + def name(self): + """Gets the name of this V1beta1TaskResourceBinding. # noqa: E501 + + Name is the name of the PipelineResource in the Pipeline's declaration # noqa: E501 + + :return: The name of this V1beta1TaskResourceBinding. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TaskResourceBinding. + + Name is the name of the PipelineResource in the Pipeline's declaration # noqa: E501 + + :param name: The name of this V1beta1TaskResourceBinding. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def paths(self): + """Gets the paths of this V1beta1TaskResourceBinding. # noqa: E501 + + Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource). # noqa: E501 + + :return: The paths of this V1beta1TaskResourceBinding. # noqa: E501 + :rtype: list[str] + """ + return self._paths + + @paths.setter + def paths(self, paths): + """Sets the paths of this V1beta1TaskResourceBinding. + + Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource). # noqa: E501 + + :param paths: The paths of this V1beta1TaskResourceBinding. # noqa: E501 + :type: list[str] + """ + + self._paths = paths + + @property + def resource_ref(self): + """Gets the resource_ref of this V1beta1TaskResourceBinding. # noqa: E501 + + + :return: The resource_ref of this V1beta1TaskResourceBinding. # noqa: E501 + :rtype: V1beta1PipelineResourceRef + """ + return self._resource_ref + + @resource_ref.setter + def resource_ref(self, resource_ref): + """Sets the resource_ref of this V1beta1TaskResourceBinding. + + + :param resource_ref: The resource_ref of this V1beta1TaskResourceBinding. # noqa: E501 + :type: V1beta1PipelineResourceRef + """ + + self._resource_ref = resource_ref + + @property + def resource_spec(self): + """Gets the resource_spec of this V1beta1TaskResourceBinding. # noqa: E501 + + + :return: The resource_spec of this V1beta1TaskResourceBinding. # noqa: E501 + :rtype: V1alpha1PipelineResourceSpec + """ + return self._resource_spec + + @resource_spec.setter + def resource_spec(self, resource_spec): + """Sets the resource_spec of this V1beta1TaskResourceBinding. + + + :param resource_spec: The resource_spec of this V1beta1TaskResourceBinding. # noqa: E501 + :type: V1alpha1PipelineResourceSpec + """ + + self._resource_spec = resource_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskResourceBinding): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskResourceBinding): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_resources.py b/sdk/python/tekton/models/v1beta1_task_resources.py new file mode 100644 index 000000000..ff56d4202 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_resources.py @@ -0,0 +1,164 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskResources(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inputs': 'list[V1beta1TaskResource]', + 'outputs': 'list[V1beta1TaskResource]' + } + + attribute_map = { + 'inputs': 'inputs', + 'outputs': 'outputs' + } + + def __init__(self, inputs=None, outputs=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskResources - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inputs = None + self._outputs = None + self.discriminator = None + + if inputs is not None: + self.inputs = inputs + if outputs is not None: + self.outputs = outputs + + @property + def inputs(self): + """Gets the inputs of this V1beta1TaskResources. # noqa: E501 + + Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :return: The inputs of this V1beta1TaskResources. # noqa: E501 + :rtype: list[V1beta1TaskResource] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this V1beta1TaskResources. + + Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :param inputs: The inputs of this V1beta1TaskResources. # noqa: E501 + :type: list[V1beta1TaskResource] + """ + + self._inputs = inputs + + @property + def outputs(self): + """Gets the outputs of this V1beta1TaskResources. # noqa: E501 + + Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :return: The outputs of this V1beta1TaskResources. # noqa: E501 + :rtype: list[V1beta1TaskResource] + """ + return self._outputs + + @outputs.setter + def outputs(self, outputs): + """Sets the outputs of this V1beta1TaskResources. + + Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task. # noqa: E501 + + :param outputs: The outputs of this V1beta1TaskResources. # noqa: E501 + :type: list[V1beta1TaskResource] + """ + + self._outputs = outputs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskResources): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskResources): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_result.py b/sdk/python/tekton/models/v1beta1_task_result.py new file mode 100644 index 000000000..aab220a56 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_result.py @@ -0,0 +1,165 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'name': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name' + } + + def __init__(self, description=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._name = None + self.discriminator = None + + if description is not None: + self.description = description + self.name = name + + @property + def description(self): + """Gets the description of this V1beta1TaskResult. # noqa: E501 + + Description is a human-readable description of the result # noqa: E501 + + :return: The description of this V1beta1TaskResult. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1TaskResult. + + Description is a human-readable description of the result # noqa: E501 + + :param description: The description of this V1beta1TaskResult. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1TaskResult. # noqa: E501 + + Name the given name # noqa: E501 + + :return: The name of this V1beta1TaskResult. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TaskResult. + + Name the given name # noqa: E501 + + :param name: The name of this V1beta1TaskResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run.py b/sdk/python/tekton/models/v1beta1_task_run.py new file mode 100644 index 000000000..fc477b66e --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run.py @@ -0,0 +1,242 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRun(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1TaskRunSpec', + 'status': 'V1beta1TaskRunStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRun - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1TaskRun. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1TaskRun. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1TaskRun. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1TaskRun. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1TaskRun. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1TaskRun. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1TaskRun. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1TaskRun. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1TaskRun. # noqa: E501 + + + :return: The metadata of this V1beta1TaskRun. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1TaskRun. + + + :param metadata: The metadata of this V1beta1TaskRun. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1TaskRun. # noqa: E501 + + + :return: The spec of this V1beta1TaskRun. # noqa: E501 + :rtype: V1beta1TaskRunSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1TaskRun. + + + :param spec: The spec of this V1beta1TaskRun. # noqa: E501 + :type: V1beta1TaskRunSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1TaskRun. # noqa: E501 + + + :return: The status of this V1beta1TaskRun. # noqa: E501 + :rtype: V1beta1TaskRunStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1TaskRun. + + + :param status: The status of this V1beta1TaskRun. # noqa: E501 + :type: V1beta1TaskRunStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRun): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRun): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_inputs.py b/sdk/python/tekton/models/v1beta1_task_run_inputs.py new file mode 100644 index 000000000..ea70e911f --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_inputs.py @@ -0,0 +1,160 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunInputs(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'params': 'list[V1beta1Param]', + 'resources': 'list[V1beta1TaskResourceBinding]' + } + + attribute_map = { + 'params': 'params', + 'resources': 'resources' + } + + def __init__(self, params=None, resources=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunInputs - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._params = None + self._resources = None + self.discriminator = None + + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + + @property + def params(self): + """Gets the params of this V1beta1TaskRunInputs. # noqa: E501 + + + :return: The params of this V1beta1TaskRunInputs. # noqa: E501 + :rtype: list[V1beta1Param] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1TaskRunInputs. + + + :param params: The params of this V1beta1TaskRunInputs. # noqa: E501 + :type: list[V1beta1Param] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1TaskRunInputs. # noqa: E501 + + + :return: The resources of this V1beta1TaskRunInputs. # noqa: E501 + :rtype: list[V1beta1TaskResourceBinding] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1TaskRunInputs. + + + :param resources: The resources of this V1beta1TaskRunInputs. # noqa: E501 + :type: list[V1beta1TaskResourceBinding] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunInputs): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunInputs): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_list.py b/sdk/python/tekton/models/v1beta1_task_run_list.py new file mode 100644 index 000000000..472cd6a6f --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_list.py @@ -0,0 +1,217 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunList(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'api_version': 'str', + 'items': 'list[V1beta1TaskRun]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1TaskRunList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1TaskRunList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1TaskRunList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1TaskRunList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1TaskRunList. # noqa: E501 + + + :return: The items of this V1beta1TaskRunList. # noqa: E501 + :rtype: list[V1beta1TaskRun] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1TaskRunList. + + + :param items: The items of this V1beta1TaskRunList. # noqa: E501 + :type: list[V1beta1TaskRun] + """ + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1TaskRunList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1TaskRunList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1TaskRunList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1TaskRunList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1TaskRunList. # noqa: E501 + + + :return: The metadata of this V1beta1TaskRunList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1TaskRunList. + + + :param metadata: The metadata of this V1beta1TaskRunList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunList): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_outputs.py b/sdk/python/tekton/models/v1beta1_task_run_outputs.py new file mode 100644 index 000000000..04098f09b --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_outputs.py @@ -0,0 +1,134 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunOutputs(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'resources': 'list[V1beta1TaskResourceBinding]' + } + + attribute_map = { + 'resources': 'resources' + } + + def __init__(self, resources=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunOutputs - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._resources = None + self.discriminator = None + + if resources is not None: + self.resources = resources + + @property + def resources(self): + """Gets the resources of this V1beta1TaskRunOutputs. # noqa: E501 + + + :return: The resources of this V1beta1TaskRunOutputs. # noqa: E501 + :rtype: list[V1beta1TaskResourceBinding] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1TaskRunOutputs. + + + :param resources: The resources of this V1beta1TaskRunOutputs. # noqa: E501 + :type: list[V1beta1TaskResourceBinding] + """ + + self._resources = resources + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunOutputs): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunOutputs): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_resources.py b/sdk/python/tekton/models/v1beta1_task_run_resources.py new file mode 100644 index 000000000..073aa5113 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_resources.py @@ -0,0 +1,164 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunResources(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inputs': 'list[V1beta1TaskResourceBinding]', + 'outputs': 'list[V1beta1TaskResourceBinding]' + } + + attribute_map = { + 'inputs': 'inputs', + 'outputs': 'outputs' + } + + def __init__(self, inputs=None, outputs=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunResources - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inputs = None + self._outputs = None + self.discriminator = None + + if inputs is not None: + self.inputs = inputs + if outputs is not None: + self.outputs = outputs + + @property + def inputs(self): + """Gets the inputs of this V1beta1TaskRunResources. # noqa: E501 + + Inputs holds the inputs resources this task was invoked with # noqa: E501 + + :return: The inputs of this V1beta1TaskRunResources. # noqa: E501 + :rtype: list[V1beta1TaskResourceBinding] + """ + return self._inputs + + @inputs.setter + def inputs(self, inputs): + """Sets the inputs of this V1beta1TaskRunResources. + + Inputs holds the inputs resources this task was invoked with # noqa: E501 + + :param inputs: The inputs of this V1beta1TaskRunResources. # noqa: E501 + :type: list[V1beta1TaskResourceBinding] + """ + + self._inputs = inputs + + @property + def outputs(self): + """Gets the outputs of this V1beta1TaskRunResources. # noqa: E501 + + Outputs holds the inputs resources this task was invoked with # noqa: E501 + + :return: The outputs of this V1beta1TaskRunResources. # noqa: E501 + :rtype: list[V1beta1TaskResourceBinding] + """ + return self._outputs + + @outputs.setter + def outputs(self, outputs): + """Sets the outputs of this V1beta1TaskRunResources. + + Outputs holds the inputs resources this task was invoked with # noqa: E501 + + :param outputs: The outputs of this V1beta1TaskRunResources. # noqa: E501 + :type: list[V1beta1TaskResourceBinding] + """ + + self._outputs = outputs + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunResources): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunResources): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_result.py b/sdk/python/tekton/models/v1beta1_task_run_result.py new file mode 100644 index 000000000..8a8c4cd9c --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_result.py @@ -0,0 +1,166 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1TaskRunResult. # noqa: E501 + + Name the given name # noqa: E501 + + :return: The name of this V1beta1TaskRunResult. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TaskRunResult. + + Name the given name # noqa: E501 + + :param name: The name of this V1beta1TaskRunResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1TaskRunResult. # noqa: E501 + + Value the given value of the result # noqa: E501 + + :return: The value of this V1beta1TaskRunResult. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1TaskRunResult. + + Value the given value of the result # noqa: E501 + + :param value: The value of this V1beta1TaskRunResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_spec.py b/sdk/python/tekton/models/v1beta1_task_run_spec.py new file mode 100644 index 000000000..d71883ab6 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_spec.py @@ -0,0 +1,346 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'params': 'list[V1beta1Param]', + 'pod_template': 'PodTemplate', + 'resources': 'V1beta1TaskRunResources', + 'service_account_name': 'str', + 'status': 'str', + 'task_ref': 'V1beta1TaskRef', + 'task_spec': 'V1beta1TaskSpec', + 'timeout': 'V1Duration', + 'workspaces': 'list[V1beta1WorkspaceBinding]' + } + + attribute_map = { + 'params': 'params', + 'pod_template': 'podTemplate', + 'resources': 'resources', + 'service_account_name': 'serviceAccountName', + 'status': 'status', + 'task_ref': 'taskRef', + 'task_spec': 'taskSpec', + 'timeout': 'timeout', + 'workspaces': 'workspaces' + } + + def __init__(self, params=None, pod_template=None, resources=None, service_account_name=None, status=None, task_ref=None, task_spec=None, timeout=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._params = None + self._pod_template = None + self._resources = None + self._service_account_name = None + self._status = None + self._task_ref = None + self._task_spec = None + self._timeout = None + self._workspaces = None + self.discriminator = None + + if params is not None: + self.params = params + if pod_template is not None: + self.pod_template = pod_template + if resources is not None: + self.resources = resources + if service_account_name is not None: + self.service_account_name = service_account_name + if status is not None: + self.status = status + if task_ref is not None: + self.task_ref = task_ref + if task_spec is not None: + self.task_spec = task_spec + if timeout is not None: + self.timeout = timeout + if workspaces is not None: + self.workspaces = workspaces + + @property + def params(self): + """Gets the params of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The params of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: list[V1beta1Param] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1TaskRunSpec. + + + :param params: The params of this V1beta1TaskRunSpec. # noqa: E501 + :type: list[V1beta1Param] + """ + + self._params = params + + @property + def pod_template(self): + """Gets the pod_template of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The pod_template of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: PodTemplate + """ + return self._pod_template + + @pod_template.setter + def pod_template(self, pod_template): + """Sets the pod_template of this V1beta1TaskRunSpec. + + + :param pod_template: The pod_template of this V1beta1TaskRunSpec. # noqa: E501 + :type: PodTemplate + """ + + self._pod_template = pod_template + + @property + def resources(self): + """Gets the resources of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The resources of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: V1beta1TaskRunResources + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1TaskRunSpec. + + + :param resources: The resources of this V1beta1TaskRunSpec. # noqa: E501 + :type: V1beta1TaskRunResources + """ + + self._resources = resources + + @property + def service_account_name(self): + """Gets the service_account_name of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The service_account_name of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: str + """ + return self._service_account_name + + @service_account_name.setter + def service_account_name(self, service_account_name): + """Sets the service_account_name of this V1beta1TaskRunSpec. + + + :param service_account_name: The service_account_name of this V1beta1TaskRunSpec. # noqa: E501 + :type: str + """ + + self._service_account_name = service_account_name + + @property + def status(self): + """Gets the status of this V1beta1TaskRunSpec. # noqa: E501 + + Used for cancelling a taskrun (and maybe more later on) # noqa: E501 + + :return: The status of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1TaskRunSpec. + + Used for cancelling a taskrun (and maybe more later on) # noqa: E501 + + :param status: The status of this V1beta1TaskRunSpec. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def task_ref(self): + """Gets the task_ref of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The task_ref of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: V1beta1TaskRef + """ + return self._task_ref + + @task_ref.setter + def task_ref(self, task_ref): + """Sets the task_ref of this V1beta1TaskRunSpec. + + + :param task_ref: The task_ref of this V1beta1TaskRunSpec. # noqa: E501 + :type: V1beta1TaskRef + """ + + self._task_ref = task_ref + + @property + def task_spec(self): + """Gets the task_spec of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The task_spec of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: V1beta1TaskSpec + """ + return self._task_spec + + @task_spec.setter + def task_spec(self, task_spec): + """Sets the task_spec of this V1beta1TaskRunSpec. + + + :param task_spec: The task_spec of this V1beta1TaskRunSpec. # noqa: E501 + :type: V1beta1TaskSpec + """ + + self._task_spec = task_spec + + @property + def timeout(self): + """Gets the timeout of this V1beta1TaskRunSpec. # noqa: E501 + + + :return: The timeout of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: V1Duration + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this V1beta1TaskRunSpec. + + + :param timeout: The timeout of this V1beta1TaskRunSpec. # noqa: E501 + :type: V1Duration + """ + + self._timeout = timeout + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1TaskRunSpec. # noqa: E501 + + Workspaces is a list of WorkspaceBindings from volumes to workspaces. # noqa: E501 + + :return: The workspaces of this V1beta1TaskRunSpec. # noqa: E501 + :rtype: list[V1beta1WorkspaceBinding] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1TaskRunSpec. + + Workspaces is a list of WorkspaceBindings from volumes to workspaces. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1TaskRunSpec. # noqa: E501 + :type: list[V1beta1WorkspaceBinding] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_status.py b/sdk/python/tekton/models/v1beta1_task_run_status.py new file mode 100644 index 000000000..249647450 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_status.py @@ -0,0 +1,467 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'annotations': 'dict(str, str)', + 'cloud_events': 'list[V1beta1CloudEventDelivery]', + 'completion_time': 'V1Time', + 'conditions': 'list[KnativeCondition]', + 'observed_generation': 'int', + 'pod_name': 'str', + 'resources_result': 'list[V1beta1PipelineResourceResult]', + 'retries_status': 'list[V1beta1TaskRunStatus]', + 'sidecars': 'list[V1beta1SidecarState]', + 'start_time': 'V1Time', + 'steps': 'list[V1beta1StepState]', + 'task_results': 'list[V1beta1TaskRunResult]', + 'task_spec': 'V1beta1TaskSpec' + } + + attribute_map = { + 'annotations': 'annotations', + 'cloud_events': 'cloudEvents', + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'observed_generation': 'observedGeneration', + 'pod_name': 'podName', + 'resources_result': 'resourcesResult', + 'retries_status': 'retriesStatus', + 'sidecars': 'sidecars', + 'start_time': 'startTime', + 'steps': 'steps', + 'task_results': 'taskResults', + 'task_spec': 'taskSpec' + } + + def __init__(self, annotations=None, cloud_events=None, completion_time=None, conditions=None, observed_generation=None, pod_name=None, resources_result=None, retries_status=None, sidecars=None, start_time=None, steps=None, task_results=None, task_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._annotations = None + self._cloud_events = None + self._completion_time = None + self._conditions = None + self._observed_generation = None + self._pod_name = None + self._resources_result = None + self._retries_status = None + self._sidecars = None + self._start_time = None + self._steps = None + self._task_results = None + self._task_spec = None + self.discriminator = None + + if annotations is not None: + self.annotations = annotations + if cloud_events is not None: + self.cloud_events = cloud_events + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if observed_generation is not None: + self.observed_generation = observed_generation + self.pod_name = pod_name + if resources_result is not None: + self.resources_result = resources_result + if retries_status is not None: + self.retries_status = retries_status + if sidecars is not None: + self.sidecars = sidecars + if start_time is not None: + self.start_time = start_time + if steps is not None: + self.steps = steps + if task_results is not None: + self.task_results = task_results + if task_spec is not None: + self.task_spec = task_spec + + @property + def annotations(self): + """Gets the annotations of this V1beta1TaskRunStatus. # noqa: E501 + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :return: The annotations of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: dict(str, str) + """ + return self._annotations + + @annotations.setter + def annotations(self, annotations): + """Sets the annotations of this V1beta1TaskRunStatus. + + Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards. # noqa: E501 + + :param annotations: The annotations of this V1beta1TaskRunStatus. # noqa: E501 + :type: dict(str, str) + """ + + self._annotations = annotations + + @property + def cloud_events(self): + """Gets the cloud_events of this V1beta1TaskRunStatus. # noqa: E501 + + CloudEvents describe the state of each cloud event requested via a CloudEventResource. # noqa: E501 + + :return: The cloud_events of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1CloudEventDelivery] + """ + return self._cloud_events + + @cloud_events.setter + def cloud_events(self, cloud_events): + """Sets the cloud_events of this V1beta1TaskRunStatus. + + CloudEvents describe the state of each cloud event requested via a CloudEventResource. # noqa: E501 + + :param cloud_events: The cloud_events of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1CloudEventDelivery] + """ + + self._cloud_events = cloud_events + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1TaskRunStatus. # noqa: E501 + + + :return: The completion_time of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1TaskRunStatus. + + + :param completion_time: The completion_time of this V1beta1TaskRunStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1TaskRunStatus. # noqa: E501 + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :return: The conditions of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[KnativeCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1TaskRunStatus. + + Conditions the latest available observations of a resource's current state. # noqa: E501 + + :param conditions: The conditions of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[KnativeCondition] + """ + + self._conditions = conditions + + @property + def observed_generation(self): + """Gets the observed_generation of this V1beta1TaskRunStatus. # noqa: E501 + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :return: The observed_generation of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: int + """ + return self._observed_generation + + @observed_generation.setter + def observed_generation(self, observed_generation): + """Sets the observed_generation of this V1beta1TaskRunStatus. + + ObservedGeneration is the 'Generation' of the Service that was last processed by the controller. # noqa: E501 + + :param observed_generation: The observed_generation of this V1beta1TaskRunStatus. # noqa: E501 + :type: int + """ + + self._observed_generation = observed_generation + + @property + def pod_name(self): + """Gets the pod_name of this V1beta1TaskRunStatus. # noqa: E501 + + PodName is the name of the pod responsible for executing this task's steps. # noqa: E501 + + :return: The pod_name of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: str + """ + return self._pod_name + + @pod_name.setter + def pod_name(self, pod_name): + """Sets the pod_name of this V1beta1TaskRunStatus. + + PodName is the name of the pod responsible for executing this task's steps. # noqa: E501 + + :param pod_name: The pod_name of this V1beta1TaskRunStatus. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pod_name is None: # noqa: E501 + raise ValueError("Invalid value for `pod_name`, must not be `None`") # noqa: E501 + + self._pod_name = pod_name + + @property + def resources_result(self): + """Gets the resources_result of this V1beta1TaskRunStatus. # noqa: E501 + + Results from Resources built during the taskRun. currently includes the digest of build container images # noqa: E501 + + :return: The resources_result of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1PipelineResourceResult] + """ + return self._resources_result + + @resources_result.setter + def resources_result(self, resources_result): + """Sets the resources_result of this V1beta1TaskRunStatus. + + Results from Resources built during the taskRun. currently includes the digest of build container images # noqa: E501 + + :param resources_result: The resources_result of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1PipelineResourceResult] + """ + + self._resources_result = resources_result + + @property + def retries_status(self): + """Gets the retries_status of this V1beta1TaskRunStatus. # noqa: E501 + + RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. # noqa: E501 + + :return: The retries_status of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1TaskRunStatus] + """ + return self._retries_status + + @retries_status.setter + def retries_status(self, retries_status): + """Sets the retries_status of this V1beta1TaskRunStatus. + + RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. # noqa: E501 + + :param retries_status: The retries_status of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1TaskRunStatus] + """ + + self._retries_status = retries_status + + @property + def sidecars(self): + """Gets the sidecars of this V1beta1TaskRunStatus. # noqa: E501 + + The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. # noqa: E501 + + :return: The sidecars of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1SidecarState] + """ + return self._sidecars + + @sidecars.setter + def sidecars(self, sidecars): + """Sets the sidecars of this V1beta1TaskRunStatus. + + The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. # noqa: E501 + + :param sidecars: The sidecars of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1SidecarState] + """ + + self._sidecars = sidecars + + @property + def start_time(self): + """Gets the start_time of this V1beta1TaskRunStatus. # noqa: E501 + + + :return: The start_time of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1TaskRunStatus. + + + :param start_time: The start_time of this V1beta1TaskRunStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def steps(self): + """Gets the steps of this V1beta1TaskRunStatus. # noqa: E501 + + Steps describes the state of each build step container. # noqa: E501 + + :return: The steps of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1StepState] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this V1beta1TaskRunStatus. + + Steps describes the state of each build step container. # noqa: E501 + + :param steps: The steps of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1StepState] + """ + + self._steps = steps + + @property + def task_results(self): + """Gets the task_results of this V1beta1TaskRunStatus. # noqa: E501 + + TaskRunResults are the list of results written out by the task's containers # noqa: E501 + + :return: The task_results of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: list[V1beta1TaskRunResult] + """ + return self._task_results + + @task_results.setter + def task_results(self, task_results): + """Sets the task_results of this V1beta1TaskRunStatus. + + TaskRunResults are the list of results written out by the task's containers # noqa: E501 + + :param task_results: The task_results of this V1beta1TaskRunStatus. # noqa: E501 + :type: list[V1beta1TaskRunResult] + """ + + self._task_results = task_results + + @property + def task_spec(self): + """Gets the task_spec of this V1beta1TaskRunStatus. # noqa: E501 + + + :return: The task_spec of this V1beta1TaskRunStatus. # noqa: E501 + :rtype: V1beta1TaskSpec + """ + return self._task_spec + + @task_spec.setter + def task_spec(self, task_spec): + """Sets the task_spec of this V1beta1TaskRunStatus. + + + :param task_spec: The task_spec of this V1beta1TaskRunStatus. # noqa: E501 + :type: V1beta1TaskSpec + """ + + self._task_spec = task_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_run_status_fields.py b/sdk/python/tekton/models/v1beta1_task_run_status_fields.py new file mode 100644 index 000000000..374ff142c --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_run_status_fields.py @@ -0,0 +1,383 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskRunStatusFields(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'cloud_events': 'list[V1beta1CloudEventDelivery]', + 'completion_time': 'V1Time', + 'pod_name': 'str', + 'resources_result': 'list[V1beta1PipelineResourceResult]', + 'retries_status': 'list[V1beta1TaskRunStatus]', + 'sidecars': 'list[V1beta1SidecarState]', + 'start_time': 'V1Time', + 'steps': 'list[V1beta1StepState]', + 'task_results': 'list[V1beta1TaskRunResult]', + 'task_spec': 'V1beta1TaskSpec' + } + + attribute_map = { + 'cloud_events': 'cloudEvents', + 'completion_time': 'completionTime', + 'pod_name': 'podName', + 'resources_result': 'resourcesResult', + 'retries_status': 'retriesStatus', + 'sidecars': 'sidecars', + 'start_time': 'startTime', + 'steps': 'steps', + 'task_results': 'taskResults', + 'task_spec': 'taskSpec' + } + + def __init__(self, cloud_events=None, completion_time=None, pod_name=None, resources_result=None, retries_status=None, sidecars=None, start_time=None, steps=None, task_results=None, task_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskRunStatusFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._cloud_events = None + self._completion_time = None + self._pod_name = None + self._resources_result = None + self._retries_status = None + self._sidecars = None + self._start_time = None + self._steps = None + self._task_results = None + self._task_spec = None + self.discriminator = None + + if cloud_events is not None: + self.cloud_events = cloud_events + if completion_time is not None: + self.completion_time = completion_time + self.pod_name = pod_name + if resources_result is not None: + self.resources_result = resources_result + if retries_status is not None: + self.retries_status = retries_status + if sidecars is not None: + self.sidecars = sidecars + if start_time is not None: + self.start_time = start_time + if steps is not None: + self.steps = steps + if task_results is not None: + self.task_results = task_results + if task_spec is not None: + self.task_spec = task_spec + + @property + def cloud_events(self): + """Gets the cloud_events of this V1beta1TaskRunStatusFields. # noqa: E501 + + CloudEvents describe the state of each cloud event requested via a CloudEventResource. # noqa: E501 + + :return: The cloud_events of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1CloudEventDelivery] + """ + return self._cloud_events + + @cloud_events.setter + def cloud_events(self, cloud_events): + """Sets the cloud_events of this V1beta1TaskRunStatusFields. + + CloudEvents describe the state of each cloud event requested via a CloudEventResource. # noqa: E501 + + :param cloud_events: The cloud_events of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1CloudEventDelivery] + """ + + self._cloud_events = cloud_events + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1TaskRunStatusFields. # noqa: E501 + + + :return: The completion_time of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1TaskRunStatusFields. + + + :param completion_time: The completion_time of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def pod_name(self): + """Gets the pod_name of this V1beta1TaskRunStatusFields. # noqa: E501 + + PodName is the name of the pod responsible for executing this task's steps. # noqa: E501 + + :return: The pod_name of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: str + """ + return self._pod_name + + @pod_name.setter + def pod_name(self, pod_name): + """Sets the pod_name of this V1beta1TaskRunStatusFields. + + PodName is the name of the pod responsible for executing this task's steps. # noqa: E501 + + :param pod_name: The pod_name of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pod_name is None: # noqa: E501 + raise ValueError("Invalid value for `pod_name`, must not be `None`") # noqa: E501 + + self._pod_name = pod_name + + @property + def resources_result(self): + """Gets the resources_result of this V1beta1TaskRunStatusFields. # noqa: E501 + + Results from Resources built during the taskRun. currently includes the digest of build container images # noqa: E501 + + :return: The resources_result of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1PipelineResourceResult] + """ + return self._resources_result + + @resources_result.setter + def resources_result(self, resources_result): + """Sets the resources_result of this V1beta1TaskRunStatusFields. + + Results from Resources built during the taskRun. currently includes the digest of build container images # noqa: E501 + + :param resources_result: The resources_result of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1PipelineResourceResult] + """ + + self._resources_result = resources_result + + @property + def retries_status(self): + """Gets the retries_status of this V1beta1TaskRunStatusFields. # noqa: E501 + + RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. # noqa: E501 + + :return: The retries_status of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1TaskRunStatus] + """ + return self._retries_status + + @retries_status.setter + def retries_status(self, retries_status): + """Sets the retries_status of this V1beta1TaskRunStatusFields. + + RetriesStatus contains the history of TaskRunStatus in case of a retry in order to keep record of failures. All TaskRunStatus stored in RetriesStatus will have no date within the RetriesStatus as is redundant. # noqa: E501 + + :param retries_status: The retries_status of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1TaskRunStatus] + """ + + self._retries_status = retries_status + + @property + def sidecars(self): + """Gets the sidecars of this V1beta1TaskRunStatusFields. # noqa: E501 + + The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. # noqa: E501 + + :return: The sidecars of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1SidecarState] + """ + return self._sidecars + + @sidecars.setter + def sidecars(self, sidecars): + """Sets the sidecars of this V1beta1TaskRunStatusFields. + + The list has one entry per sidecar in the manifest. Each entry is represents the imageid of the corresponding sidecar. # noqa: E501 + + :param sidecars: The sidecars of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1SidecarState] + """ + + self._sidecars = sidecars + + @property + def start_time(self): + """Gets the start_time of this V1beta1TaskRunStatusFields. # noqa: E501 + + + :return: The start_time of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1TaskRunStatusFields. + + + :param start_time: The start_time of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def steps(self): + """Gets the steps of this V1beta1TaskRunStatusFields. # noqa: E501 + + Steps describes the state of each build step container. # noqa: E501 + + :return: The steps of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1StepState] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this V1beta1TaskRunStatusFields. + + Steps describes the state of each build step container. # noqa: E501 + + :param steps: The steps of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1StepState] + """ + + self._steps = steps + + @property + def task_results(self): + """Gets the task_results of this V1beta1TaskRunStatusFields. # noqa: E501 + + TaskRunResults are the list of results written out by the task's containers # noqa: E501 + + :return: The task_results of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: list[V1beta1TaskRunResult] + """ + return self._task_results + + @task_results.setter + def task_results(self, task_results): + """Sets the task_results of this V1beta1TaskRunStatusFields. + + TaskRunResults are the list of results written out by the task's containers # noqa: E501 + + :param task_results: The task_results of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: list[V1beta1TaskRunResult] + """ + + self._task_results = task_results + + @property + def task_spec(self): + """Gets the task_spec of this V1beta1TaskRunStatusFields. # noqa: E501 + + + :return: The task_spec of this V1beta1TaskRunStatusFields. # noqa: E501 + :rtype: V1beta1TaskSpec + """ + return self._task_spec + + @task_spec.setter + def task_spec(self, task_spec): + """Sets the task_spec of this V1beta1TaskRunStatusFields. + + + :param task_spec: The task_spec of this V1beta1TaskRunStatusFields. # noqa: E501 + :type: V1beta1TaskSpec + """ + + self._task_spec = task_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskRunStatusFields): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskRunStatusFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_task_spec.py b/sdk/python/tekton/models/v1beta1_task_spec.py new file mode 100644 index 000000000..f957344f3 --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_task_spec.py @@ -0,0 +1,356 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1TaskSpec(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'description': 'str', + 'params': 'list[V1beta1ParamSpec]', + 'resources': 'V1beta1TaskResources', + 'results': 'list[V1beta1TaskResult]', + 'sidecars': 'list[V1beta1Sidecar]', + 'step_template': 'V1Container', + 'steps': 'list[V1beta1Step]', + 'volumes': 'list[V1Volume]', + 'workspaces': 'list[V1beta1WorkspaceDeclaration]' + } + + attribute_map = { + 'description': 'description', + 'params': 'params', + 'resources': 'resources', + 'results': 'results', + 'sidecars': 'sidecars', + 'step_template': 'stepTemplate', + 'steps': 'steps', + 'volumes': 'volumes', + 'workspaces': 'workspaces' + } + + def __init__(self, description=None, params=None, resources=None, results=None, sidecars=None, step_template=None, steps=None, volumes=None, workspaces=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TaskSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._description = None + self._params = None + self._resources = None + self._results = None + self._sidecars = None + self._step_template = None + self._steps = None + self._volumes = None + self._workspaces = None + self.discriminator = None + + if description is not None: + self.description = description + if params is not None: + self.params = params + if resources is not None: + self.resources = resources + if results is not None: + self.results = results + if sidecars is not None: + self.sidecars = sidecars + if step_template is not None: + self.step_template = step_template + if steps is not None: + self.steps = steps + if volumes is not None: + self.volumes = volumes + if workspaces is not None: + self.workspaces = workspaces + + @property + def description(self): + """Gets the description of this V1beta1TaskSpec. # noqa: E501 + + Description is a user-facing description of the task that may be used to populate a UI. # noqa: E501 + + :return: The description of this V1beta1TaskSpec. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1TaskSpec. + + Description is a user-facing description of the task that may be used to populate a UI. # noqa: E501 + + :param description: The description of this V1beta1TaskSpec. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def params(self): + """Gets the params of this V1beta1TaskSpec. # noqa: E501 + + Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. # noqa: E501 + + :return: The params of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1beta1ParamSpec] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this V1beta1TaskSpec. + + Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value. # noqa: E501 + + :param params: The params of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1beta1ParamSpec] + """ + + self._params = params + + @property + def resources(self): + """Gets the resources of this V1beta1TaskSpec. # noqa: E501 + + + :return: The resources of this V1beta1TaskSpec. # noqa: E501 + :rtype: V1beta1TaskResources + """ + return self._resources + + @resources.setter + def resources(self, resources): + """Sets the resources of this V1beta1TaskSpec. + + + :param resources: The resources of this V1beta1TaskSpec. # noqa: E501 + :type: V1beta1TaskResources + """ + + self._resources = resources + + @property + def results(self): + """Gets the results of this V1beta1TaskSpec. # noqa: E501 + + Results are values that this Task can output # noqa: E501 + + :return: The results of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1beta1TaskResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this V1beta1TaskSpec. + + Results are values that this Task can output # noqa: E501 + + :param results: The results of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1beta1TaskResult] + """ + + self._results = results + + @property + def sidecars(self): + """Gets the sidecars of this V1beta1TaskSpec. # noqa: E501 + + Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. # noqa: E501 + + :return: The sidecars of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1beta1Sidecar] + """ + return self._sidecars + + @sidecars.setter + def sidecars(self, sidecars): + """Sets the sidecars of this V1beta1TaskSpec. + + Sidecars are run alongside the Task's step containers. They begin before the steps start and end after the steps complete. # noqa: E501 + + :param sidecars: The sidecars of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1beta1Sidecar] + """ + + self._sidecars = sidecars + + @property + def step_template(self): + """Gets the step_template of this V1beta1TaskSpec. # noqa: E501 + + + :return: The step_template of this V1beta1TaskSpec. # noqa: E501 + :rtype: V1Container + """ + return self._step_template + + @step_template.setter + def step_template(self, step_template): + """Sets the step_template of this V1beta1TaskSpec. + + + :param step_template: The step_template of this V1beta1TaskSpec. # noqa: E501 + :type: V1Container + """ + + self._step_template = step_template + + @property + def steps(self): + """Gets the steps of this V1beta1TaskSpec. # noqa: E501 + + Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. # noqa: E501 + + :return: The steps of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1beta1Step] + """ + return self._steps + + @steps.setter + def steps(self, steps): + """Sets the steps of this V1beta1TaskSpec. + + Steps are the steps of the build; each step is run sequentially with the source mounted into /workspace. # noqa: E501 + + :param steps: The steps of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1beta1Step] + """ + + self._steps = steps + + @property + def volumes(self): + """Gets the volumes of this V1beta1TaskSpec. # noqa: E501 + + Volumes is a collection of volumes that are available to mount into the steps of the build. # noqa: E501 + + :return: The volumes of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1Volume] + """ + return self._volumes + + @volumes.setter + def volumes(self, volumes): + """Sets the volumes of this V1beta1TaskSpec. + + Volumes is a collection of volumes that are available to mount into the steps of the build. # noqa: E501 + + :param volumes: The volumes of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1Volume] + """ + + self._volumes = volumes + + @property + def workspaces(self): + """Gets the workspaces of this V1beta1TaskSpec. # noqa: E501 + + Workspaces are the volumes that this Task requires. # noqa: E501 + + :return: The workspaces of this V1beta1TaskSpec. # noqa: E501 + :rtype: list[V1beta1WorkspaceDeclaration] + """ + return self._workspaces + + @workspaces.setter + def workspaces(self, workspaces): + """Sets the workspaces of this V1beta1TaskSpec. + + Workspaces are the volumes that this Task requires. # noqa: E501 + + :param workspaces: The workspaces of this V1beta1TaskSpec. # noqa: E501 + :type: list[V1beta1WorkspaceDeclaration] + """ + + self._workspaces = workspaces + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TaskSpec): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, V1beta1TaskSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/tekton/models/v1beta1_when_expression.py b/sdk/python/tekton/models/v1beta1_when_expression.py new file mode 100644 index 000000000..8f156fbbc --- /dev/null +++ b/sdk/python/tekton/models/v1beta1_when_expression.py @@ -0,0 +1,279 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from tekton.configuration import Configuration + + +class V1beta1WhenExpression(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'input': 'str', + 'operator': 'str', + 'values': 'list[str]', + 'input': 'str', + 'operator': 'str', + 'values': 'list[str]' + } + + attribute_map = { + 'input': 'Input', + 'operator': 'Operator', + 'values': 'Values', + 'input': 'input', + 'operator': 'operator', + 'values': 'values' + } + + def __init__(self, input=None, operator=None, values=None, input=None, operator=None, values=None, local_vars_configuration=None): # noqa: E501 + """V1beta1WhenExpression - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._input = None + self._operator = None + self._values = None + self._input = None + self._operator = None + self._values = None + self.discriminator = None + + if input is not None: + self.input = input + if operator is not None: + self.operator = operator + if values is not None: + self.values = values + self.input = input + self.operator = operator + self.values = values + + @property + def input(self): + """Gets the input of this V1beta1WhenExpression. # noqa: E501 + + DeprecatedInput for backwards compatibility with =2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/sdk/python/test/__init__.py b/sdk/python/test/__init__.py new file mode 100644 index 000000000..57ae038a5 --- /dev/null +++ b/sdk/python/test/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/sdk/python/test/test_pod_template.py b/sdk/python/test/test_pod_template.py new file mode 100644 index 000000000..6d89c45f6 --- /dev/null +++ b/sdk/python/test/test_pod_template.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.pod_template import PodTemplate # noqa: E501 +from tekton.rest import ApiException + + +class TestPodTemplate(unittest.TestCase): + """PodTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPodTemplate(self): + """Test PodTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.pod_template.PodTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_pipeline_resource.py b/sdk/python/test/test_v1alpha1_pipeline_resource.py new file mode 100644 index 000000000..1d69777ed --- /dev/null +++ b/sdk/python/test/test_v1alpha1_pipeline_resource.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_pipeline_resource import V1alpha1PipelineResource # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1PipelineResource(unittest.TestCase): + """V1alpha1PipelineResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1PipelineResource(self): + """Test V1alpha1PipelineResource""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_pipeline_resource.V1alpha1PipelineResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_pipeline_resource_list.py b/sdk/python/test/test_v1alpha1_pipeline_resource_list.py new file mode 100644 index 000000000..5a806d837 --- /dev/null +++ b/sdk/python/test/test_v1alpha1_pipeline_resource_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_pipeline_resource_list import V1alpha1PipelineResourceList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1PipelineResourceList(unittest.TestCase): + """V1alpha1PipelineResourceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1PipelineResourceList(self): + """Test V1alpha1PipelineResourceList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_pipeline_resource_list.V1alpha1PipelineResourceList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_pipeline_resource_spec.py b/sdk/python/test/test_v1alpha1_pipeline_resource_spec.py new file mode 100644 index 000000000..7ffd89abc --- /dev/null +++ b/sdk/python/test/test_v1alpha1_pipeline_resource_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_pipeline_resource_spec import V1alpha1PipelineResourceSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1PipelineResourceSpec(unittest.TestCase): + """V1alpha1PipelineResourceSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1PipelineResourceSpec(self): + """Test V1alpha1PipelineResourceSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_pipeline_resource_spec.V1alpha1PipelineResourceSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_pipeline_resource_status.py b/sdk/python/test/test_v1alpha1_pipeline_resource_status.py new file mode 100644 index 000000000..bf97419c8 --- /dev/null +++ b/sdk/python/test/test_v1alpha1_pipeline_resource_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_pipeline_resource_status import V1alpha1PipelineResourceStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1PipelineResourceStatus(unittest.TestCase): + """V1alpha1PipelineResourceStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1PipelineResourceStatus(self): + """Test V1alpha1PipelineResourceStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_pipeline_resource_status.V1alpha1PipelineResourceStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_resource_declaration.py b/sdk/python/test/test_v1alpha1_resource_declaration.py new file mode 100644 index 000000000..eb9e9e3b2 --- /dev/null +++ b/sdk/python/test/test_v1alpha1_resource_declaration.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_resource_declaration import V1alpha1ResourceDeclaration # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1ResourceDeclaration(unittest.TestCase): + """V1alpha1ResourceDeclaration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1ResourceDeclaration(self): + """Test V1alpha1ResourceDeclaration""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_resource_declaration.V1alpha1ResourceDeclaration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_resource_param.py b/sdk/python/test/test_v1alpha1_resource_param.py new file mode 100644 index 000000000..00e14baa3 --- /dev/null +++ b/sdk/python/test/test_v1alpha1_resource_param.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_resource_param import V1alpha1ResourceParam # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1ResourceParam(unittest.TestCase): + """V1alpha1ResourceParam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1ResourceParam(self): + """Test V1alpha1ResourceParam""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_resource_param.V1alpha1ResourceParam() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1alpha1_secret_param.py b/sdk/python/test/test_v1alpha1_secret_param.py new file mode 100644 index 000000000..2957e65e8 --- /dev/null +++ b/sdk/python/test/test_v1alpha1_secret_param.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1alpha1_secret_param import V1alpha1SecretParam # noqa: E501 +from tekton.rest import ApiException + + +class TestV1alpha1SecretParam(unittest.TestCase): + """V1alpha1SecretParam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1alpha1SecretParam(self): + """Test V1alpha1SecretParam""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1alpha1_secret_param.V1alpha1SecretParam() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_array_or_string.py b/sdk/python/test/test_v1beta1_array_or_string.py new file mode 100644 index 000000000..114a9f3d3 --- /dev/null +++ b/sdk/python/test/test_v1beta1_array_or_string.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_array_or_string import V1beta1ArrayOrString # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ArrayOrString(unittest.TestCase): + """V1beta1ArrayOrString unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ArrayOrString(self): + """Test V1beta1ArrayOrString""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_array_or_string.V1beta1ArrayOrString() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_cannot_convert_error.py b/sdk/python/test/test_v1beta1_cannot_convert_error.py new file mode 100644 index 000000000..671092b10 --- /dev/null +++ b/sdk/python/test/test_v1beta1_cannot_convert_error.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_cannot_convert_error import V1beta1CannotConvertError # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1CannotConvertError(unittest.TestCase): + """V1beta1CannotConvertError unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1CannotConvertError(self): + """Test V1beta1CannotConvertError""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_cannot_convert_error.V1beta1CannotConvertError() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_cloud_event_delivery.py b/sdk/python/test/test_v1beta1_cloud_event_delivery.py new file mode 100644 index 000000000..9366ced5d --- /dev/null +++ b/sdk/python/test/test_v1beta1_cloud_event_delivery.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_cloud_event_delivery import V1beta1CloudEventDelivery # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1CloudEventDelivery(unittest.TestCase): + """V1beta1CloudEventDelivery unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1CloudEventDelivery(self): + """Test V1beta1CloudEventDelivery""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_cloud_event_delivery.V1beta1CloudEventDelivery() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_cloud_event_delivery_state.py b/sdk/python/test/test_v1beta1_cloud_event_delivery_state.py new file mode 100644 index 000000000..ab07e72fe --- /dev/null +++ b/sdk/python/test/test_v1beta1_cloud_event_delivery_state.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_cloud_event_delivery_state import V1beta1CloudEventDeliveryState # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1CloudEventDeliveryState(unittest.TestCase): + """V1beta1CloudEventDeliveryState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1CloudEventDeliveryState(self): + """Test V1beta1CloudEventDeliveryState""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_cloud_event_delivery_state.V1beta1CloudEventDeliveryState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_cluster_task.py b/sdk/python/test/test_v1beta1_cluster_task.py new file mode 100644 index 000000000..fa01da8e9 --- /dev/null +++ b/sdk/python/test/test_v1beta1_cluster_task.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_cluster_task import V1beta1ClusterTask # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ClusterTask(unittest.TestCase): + """V1beta1ClusterTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ClusterTask(self): + """Test V1beta1ClusterTask""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_cluster_task.V1beta1ClusterTask() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_cluster_task_list.py b/sdk/python/test/test_v1beta1_cluster_task_list.py new file mode 100644 index 000000000..33808581f --- /dev/null +++ b/sdk/python/test/test_v1beta1_cluster_task_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_cluster_task_list import V1beta1ClusterTaskList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ClusterTaskList(unittest.TestCase): + """V1beta1ClusterTaskList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ClusterTaskList(self): + """Test V1beta1ClusterTaskList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_cluster_task_list.V1beta1ClusterTaskList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_condition_check.py b/sdk/python/test/test_v1beta1_condition_check.py new file mode 100644 index 000000000..2ce4d40a8 --- /dev/null +++ b/sdk/python/test/test_v1beta1_condition_check.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_condition_check import V1beta1ConditionCheck # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ConditionCheck(unittest.TestCase): + """V1beta1ConditionCheck unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ConditionCheck(self): + """Test V1beta1ConditionCheck""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_condition_check.V1beta1ConditionCheck() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_condition_check_status.py b/sdk/python/test/test_v1beta1_condition_check_status.py new file mode 100644 index 000000000..786da40a3 --- /dev/null +++ b/sdk/python/test/test_v1beta1_condition_check_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_condition_check_status import V1beta1ConditionCheckStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ConditionCheckStatus(unittest.TestCase): + """V1beta1ConditionCheckStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ConditionCheckStatus(self): + """Test V1beta1ConditionCheckStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_condition_check_status.V1beta1ConditionCheckStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_condition_check_status_fields.py b/sdk/python/test/test_v1beta1_condition_check_status_fields.py new file mode 100644 index 000000000..e68e1b700 --- /dev/null +++ b/sdk/python/test/test_v1beta1_condition_check_status_fields.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_condition_check_status_fields import V1beta1ConditionCheckStatusFields # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ConditionCheckStatusFields(unittest.TestCase): + """V1beta1ConditionCheckStatusFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ConditionCheckStatusFields(self): + """Test V1beta1ConditionCheckStatusFields""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_condition_check_status_fields.V1beta1ConditionCheckStatusFields() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_embedded_task.py b/sdk/python/test/test_v1beta1_embedded_task.py new file mode 100644 index 000000000..cdba6c0a6 --- /dev/null +++ b/sdk/python/test/test_v1beta1_embedded_task.py @@ -0,0 +1,200 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import tekton +from tekton.models.v1beta1_embedded_task import V1beta1EmbeddedTask # noqa: E501 +from tekton.rest import ApiException + +class TestV1beta1EmbeddedTask(unittest.TestCase): + """V1beta1EmbeddedTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test V1beta1EmbeddedTask + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = tekton.models.v1beta1_embedded_task.V1beta1EmbeddedTask() # noqa: E501 + if include_optional : + return V1beta1EmbeddedTask( + description = '0', + metadata = tekton.models.v1beta1/pipeline_task_metadata.v1beta1.PipelineTaskMetadata( + annotations = { + 'key' : '0' + }, + labels = { + 'key' : '0' + }, ), + params = [ + tekton.models.v1beta1/param_spec.v1beta1.ParamSpec( + default = tekton.models.v1beta1/array_or_string.v1beta1.ArrayOrString( + array_val = [ + '0' + ], + string_val = '0', + type = '0', ), + description = '0', + name = '0', + type = '0', ) + ], + resources = tekton.models.v1beta1/task_resources.v1beta1.TaskResources( + inputs = [ + tekton.models.v1beta1/task_resource.v1beta1.TaskResource( + description = '0', + name = '0', + optional = True, + target_path = '0', + type = '0', ) + ], + outputs = [ + tekton.models.v1beta1/task_resource.v1beta1.TaskResource( + description = '0', + name = '0', + optional = True, + target_path = '0', + type = '0', ) + ], ), + results = [ + tekton.models.v1beta1/task_result.v1beta1.TaskResult( + description = '0', + name = '0', ) + ], + sidecars = [ + tekton.models.v1beta1/sidecar.v1beta1.Sidecar( + args = [ + '0' + ], + command = [ + '0' + ], + env = [ + None + ], + env_from = [ + None + ], + image = '0', + image_pull_policy = '0', + lifecycle = None, + liveness_probe = None, + name = '0', + ports = [ + None + ], + readiness_probe = None, + resources = None, + script = '0', + security_context = None, + startup_probe = None, + stdin = True, + stdin_once = True, + termination_message_path = '0', + termination_message_policy = '0', + tty = True, + volume_devices = [ + None + ], + volume_mounts = [ + None + ], + working_dir = '0', ) + ], + step_template = None, + steps = [ + tekton.models.v1beta1/step.v1beta1.Step( + args = [ + '0' + ], + command = [ + '0' + ], + env = [ + None + ], + env_from = [ + None + ], + image = '0', + image_pull_policy = '0', + lifecycle = None, + liveness_probe = None, + name = '0', + ports = [ + None + ], + readiness_probe = None, + resources = None, + script = '0', + security_context = None, + startup_probe = None, + stdin = True, + stdin_once = True, + termination_message_path = '0', + termination_message_policy = '0', + timeout = None, + tty = True, + volume_devices = [ + None + ], + volume_mounts = [ + None + ], + working_dir = '0', ) + ], + volumes = [ + None + ], + workspaces = [ + tekton.models.v1beta1/workspace_declaration.v1beta1.WorkspaceDeclaration( + description = '0', + mount_path = '0', + name = '0', + optional = True, + read_only = True, ) + ] + ) + else : + return V1beta1EmbeddedTask( + ) + + def testV1beta1EmbeddedTask(self): + """Test V1beta1EmbeddedTask""" + 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/sdk/python/test/test_v1beta1_internal_task_modifier.py b/sdk/python/test/test_v1beta1_internal_task_modifier.py new file mode 100644 index 000000000..5f1e53e19 --- /dev/null +++ b/sdk/python/test/test_v1beta1_internal_task_modifier.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_internal_task_modifier import V1beta1InternalTaskModifier # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1InternalTaskModifier(unittest.TestCase): + """V1beta1InternalTaskModifier unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1InternalTaskModifier(self): + """Test V1beta1InternalTaskModifier""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_internal_task_modifier.V1beta1InternalTaskModifier() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_param.py b/sdk/python/test/test_v1beta1_param.py new file mode 100644 index 000000000..fd103723d --- /dev/null +++ b/sdk/python/test/test_v1beta1_param.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_param import V1beta1Param # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1Param(unittest.TestCase): + """V1beta1Param unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Param(self): + """Test V1beta1Param""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_param.V1beta1Param() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_param_spec.py b/sdk/python/test/test_v1beta1_param_spec.py new file mode 100644 index 000000000..073b55032 --- /dev/null +++ b/sdk/python/test/test_v1beta1_param_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_param_spec import V1beta1ParamSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ParamSpec(unittest.TestCase): + """V1beta1ParamSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ParamSpec(self): + """Test V1beta1ParamSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_param_spec.V1beta1ParamSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline.py b/sdk/python/test/test_v1beta1_pipeline.py new file mode 100644 index 000000000..50b5e616f --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline import V1beta1Pipeline # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1Pipeline(unittest.TestCase): + """V1beta1Pipeline unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Pipeline(self): + """Test V1beta1Pipeline""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline.V1beta1Pipeline() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_declared_resource.py b/sdk/python/test/test_v1beta1_pipeline_declared_resource.py new file mode 100644 index 000000000..a9113599f --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_declared_resource.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_declared_resource import V1beta1PipelineDeclaredResource # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineDeclaredResource(unittest.TestCase): + """V1beta1PipelineDeclaredResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineDeclaredResource(self): + """Test V1beta1PipelineDeclaredResource""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_declared_resource.V1beta1PipelineDeclaredResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_list.py b/sdk/python/test/test_v1beta1_pipeline_list.py new file mode 100644 index 000000000..35b522991 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_list import V1beta1PipelineList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineList(unittest.TestCase): + """V1beta1PipelineList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineList(self): + """Test V1beta1PipelineList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_list.V1beta1PipelineList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_ref.py b/sdk/python/test/test_v1beta1_pipeline_ref.py new file mode 100644 index 000000000..2052de636 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_ref.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_ref import V1beta1PipelineRef # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRef(unittest.TestCase): + """V1beta1PipelineRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRef(self): + """Test V1beta1PipelineRef""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_ref.V1beta1PipelineRef() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_resource_binding.py b/sdk/python/test/test_v1beta1_pipeline_resource_binding.py new file mode 100644 index 000000000..ff3b56b7f --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_resource_binding.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_resource_binding import V1beta1PipelineResourceBinding # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineResourceBinding(unittest.TestCase): + """V1beta1PipelineResourceBinding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineResourceBinding(self): + """Test V1beta1PipelineResourceBinding""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_resource_binding.V1beta1PipelineResourceBinding() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_resource_ref.py b/sdk/python/test/test_v1beta1_pipeline_resource_ref.py new file mode 100644 index 000000000..2e455e23e --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_resource_ref.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_resource_ref import V1beta1PipelineResourceRef # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineResourceRef(unittest.TestCase): + """V1beta1PipelineResourceRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineResourceRef(self): + """Test V1beta1PipelineResourceRef""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_resource_ref.V1beta1PipelineResourceRef() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_resource_result.py b/sdk/python/test/test_v1beta1_pipeline_resource_result.py new file mode 100644 index 000000000..7552fd78b --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_resource_result.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_resource_result import V1beta1PipelineResourceResult # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineResourceResult(unittest.TestCase): + """V1beta1PipelineResourceResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineResourceResult(self): + """Test V1beta1PipelineResourceResult""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_resource_result.V1beta1PipelineResourceResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_result.py b/sdk/python/test/test_v1beta1_pipeline_result.py new file mode 100644 index 000000000..b87baac30 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_result.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_result import V1beta1PipelineResult # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineResult(unittest.TestCase): + """V1beta1PipelineResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineResult(self): + """Test V1beta1PipelineResult""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_result.V1beta1PipelineResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run.py b/sdk/python/test/test_v1beta1_pipeline_run.py new file mode 100644 index 000000000..d9c82c4c9 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run import V1beta1PipelineRun # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRun(unittest.TestCase): + """V1beta1PipelineRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRun(self): + """Test V1beta1PipelineRun""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run.V1beta1PipelineRun() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_condition_check_status.py b/sdk/python/test/test_v1beta1_pipeline_run_condition_check_status.py new file mode 100644 index 000000000..0fc108e34 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_condition_check_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_condition_check_status import V1beta1PipelineRunConditionCheckStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunConditionCheckStatus(unittest.TestCase): + """V1beta1PipelineRunConditionCheckStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunConditionCheckStatus(self): + """Test V1beta1PipelineRunConditionCheckStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_condition_check_status.V1beta1PipelineRunConditionCheckStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_list.py b/sdk/python/test/test_v1beta1_pipeline_run_list.py new file mode 100644 index 000000000..d3d9bc777 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_list import V1beta1PipelineRunList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunList(unittest.TestCase): + """V1beta1PipelineRunList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunList(self): + """Test V1beta1PipelineRunList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_list.V1beta1PipelineRunList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_result.py b/sdk/python/test/test_v1beta1_pipeline_run_result.py new file mode 100644 index 000000000..d56682b00 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_result.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_result import V1beta1PipelineRunResult # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunResult(unittest.TestCase): + """V1beta1PipelineRunResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunResult(self): + """Test V1beta1PipelineRunResult""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_result.V1beta1PipelineRunResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_spec.py b/sdk/python/test/test_v1beta1_pipeline_run_spec.py new file mode 100644 index 000000000..7a9078801 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_spec import V1beta1PipelineRunSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunSpec(unittest.TestCase): + """V1beta1PipelineRunSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunSpec(self): + """Test V1beta1PipelineRunSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_spec.V1beta1PipelineRunSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_spec_service_account_name.py b/sdk/python/test/test_v1beta1_pipeline_run_spec_service_account_name.py new file mode 100644 index 000000000..842a6becd --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_spec_service_account_name.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_spec_service_account_name import V1beta1PipelineRunSpecServiceAccountName # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunSpecServiceAccountName(unittest.TestCase): + """V1beta1PipelineRunSpecServiceAccountName unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunSpecServiceAccountName(self): + """Test V1beta1PipelineRunSpecServiceAccountName""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_spec_service_account_name.V1beta1PipelineRunSpecServiceAccountName() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_status.py b/sdk/python/test/test_v1beta1_pipeline_run_status.py new file mode 100644 index 000000000..e2037c2ed --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_status import V1beta1PipelineRunStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunStatus(unittest.TestCase): + """V1beta1PipelineRunStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunStatus(self): + """Test V1beta1PipelineRunStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_status.V1beta1PipelineRunStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_status_fields.py b/sdk/python/test/test_v1beta1_pipeline_run_status_fields.py new file mode 100644 index 000000000..8a80d64cc --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_status_fields.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_status_fields import V1beta1PipelineRunStatusFields # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunStatusFields(unittest.TestCase): + """V1beta1PipelineRunStatusFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunStatusFields(self): + """Test V1beta1PipelineRunStatusFields""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_status_fields.V1beta1PipelineRunStatusFields() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_run_task_run_status.py b/sdk/python/test/test_v1beta1_pipeline_run_task_run_status.py new file mode 100644 index 000000000..898194c37 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_run_task_run_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_run_task_run_status import V1beta1PipelineRunTaskRunStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineRunTaskRunStatus(unittest.TestCase): + """V1beta1PipelineRunTaskRunStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineRunTaskRunStatus(self): + """Test V1beta1PipelineRunTaskRunStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_run_task_run_status.V1beta1PipelineRunTaskRunStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_spec.py b/sdk/python/test/test_v1beta1_pipeline_spec.py new file mode 100644 index 000000000..70814e1bb --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_spec import V1beta1PipelineSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineSpec(unittest.TestCase): + """V1beta1PipelineSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineSpec(self): + """Test V1beta1PipelineSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_spec.V1beta1PipelineSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task.py b/sdk/python/test/test_v1beta1_pipeline_task.py new file mode 100644 index 000000000..2a7681a75 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task import V1beta1PipelineTask # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTask(unittest.TestCase): + """V1beta1PipelineTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTask(self): + """Test V1beta1PipelineTask""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task.V1beta1PipelineTask() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_condition.py b/sdk/python/test/test_v1beta1_pipeline_task_condition.py new file mode 100644 index 000000000..118184b46 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_condition.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_condition import V1beta1PipelineTaskCondition # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskCondition(unittest.TestCase): + """V1beta1PipelineTaskCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskCondition(self): + """Test V1beta1PipelineTaskCondition""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_condition.V1beta1PipelineTaskCondition() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_input_resource.py b/sdk/python/test/test_v1beta1_pipeline_task_input_resource.py new file mode 100644 index 000000000..8c2c86421 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_input_resource.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_input_resource import V1beta1PipelineTaskInputResource # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskInputResource(unittest.TestCase): + """V1beta1PipelineTaskInputResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskInputResource(self): + """Test V1beta1PipelineTaskInputResource""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_input_resource.V1beta1PipelineTaskInputResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_metadata.py b/sdk/python/test/test_v1beta1_pipeline_task_metadata.py new file mode 100644 index 000000000..10cf499c4 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_metadata.py @@ -0,0 +1,71 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import tekton +from tekton.models.v1beta1_pipeline_task_metadata import V1beta1PipelineTaskMetadata # noqa: E501 +from tekton.rest import ApiException + +class TestV1beta1PipelineTaskMetadata(unittest.TestCase): + """V1beta1PipelineTaskMetadata unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test V1beta1PipelineTaskMetadata + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = tekton.models.v1beta1_pipeline_task_metadata.V1beta1PipelineTaskMetadata() # noqa: E501 + if include_optional : + return V1beta1PipelineTaskMetadata( + annotations = { + 'key' : '0' + }, + labels = { + 'key' : '0' + } + ) + else : + return V1beta1PipelineTaskMetadata( + ) + + def testV1beta1PipelineTaskMetadata(self): + """Test V1beta1PipelineTaskMetadata""" + 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/sdk/python/test/test_v1beta1_pipeline_task_output_resource.py b/sdk/python/test/test_v1beta1_pipeline_task_output_resource.py new file mode 100644 index 000000000..be848eb2f --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_output_resource.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_output_resource import V1beta1PipelineTaskOutputResource # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskOutputResource(unittest.TestCase): + """V1beta1PipelineTaskOutputResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskOutputResource(self): + """Test V1beta1PipelineTaskOutputResource""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_output_resource.V1beta1PipelineTaskOutputResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_param.py b/sdk/python/test/test_v1beta1_pipeline_task_param.py new file mode 100644 index 000000000..149863480 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_param.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_param import V1beta1PipelineTaskParam # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskParam(unittest.TestCase): + """V1beta1PipelineTaskParam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskParam(self): + """Test V1beta1PipelineTaskParam""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_param.V1beta1PipelineTaskParam() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_resources.py b/sdk/python/test/test_v1beta1_pipeline_task_resources.py new file mode 100644 index 000000000..01bd9afce --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_resources.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_resources import V1beta1PipelineTaskResources # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskResources(unittest.TestCase): + """V1beta1PipelineTaskResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskResources(self): + """Test V1beta1PipelineTaskResources""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_resources.V1beta1PipelineTaskResources() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_run.py b/sdk/python/test/test_v1beta1_pipeline_task_run.py new file mode 100644 index 000000000..343c34268 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_run.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_run import V1beta1PipelineTaskRun # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskRun(unittest.TestCase): + """V1beta1PipelineTaskRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskRun(self): + """Test V1beta1PipelineTaskRun""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_run.V1beta1PipelineTaskRun() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_task_run_spec.py b/sdk/python/test/test_v1beta1_pipeline_task_run_spec.py new file mode 100644 index 000000000..7eae7ded2 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_task_run_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_task_run_spec import V1beta1PipelineTaskRunSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineTaskRunSpec(unittest.TestCase): + """V1beta1PipelineTaskRunSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineTaskRunSpec(self): + """Test V1beta1PipelineTaskRunSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_task_run_spec.V1beta1PipelineTaskRunSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_pipeline_workspace_declaration.py b/sdk/python/test/test_v1beta1_pipeline_workspace_declaration.py new file mode 100644 index 000000000..bbc18e192 --- /dev/null +++ b/sdk/python/test/test_v1beta1_pipeline_workspace_declaration.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_pipeline_workspace_declaration import V1beta1PipelineWorkspaceDeclaration # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1PipelineWorkspaceDeclaration(unittest.TestCase): + """V1beta1PipelineWorkspaceDeclaration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1PipelineWorkspaceDeclaration(self): + """Test V1beta1PipelineWorkspaceDeclaration""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_pipeline_workspace_declaration.V1beta1PipelineWorkspaceDeclaration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_result_ref.py b/sdk/python/test/test_v1beta1_result_ref.py new file mode 100644 index 000000000..57397871a --- /dev/null +++ b/sdk/python/test/test_v1beta1_result_ref.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_result_ref import V1beta1ResultRef # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1ResultRef(unittest.TestCase): + """V1beta1ResultRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ResultRef(self): + """Test V1beta1ResultRef""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_result_ref.V1beta1ResultRef() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_sidecar.py b/sdk/python/test/test_v1beta1_sidecar.py new file mode 100644 index 000000000..fa30dc3c1 --- /dev/null +++ b/sdk/python/test/test_v1beta1_sidecar.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_sidecar import V1beta1Sidecar # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1Sidecar(unittest.TestCase): + """V1beta1Sidecar unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Sidecar(self): + """Test V1beta1Sidecar""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_sidecar.V1beta1Sidecar() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_sidecar_state.py b/sdk/python/test/test_v1beta1_sidecar_state.py new file mode 100644 index 000000000..6c990ca21 --- /dev/null +++ b/sdk/python/test/test_v1beta1_sidecar_state.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_sidecar_state import V1beta1SidecarState # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1SidecarState(unittest.TestCase): + """V1beta1SidecarState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SidecarState(self): + """Test V1beta1SidecarState""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_sidecar_state.V1beta1SidecarState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_skipped_task.py b/sdk/python/test/test_v1beta1_skipped_task.py new file mode 100644 index 000000000..fbb77894f --- /dev/null +++ b/sdk/python/test/test_v1beta1_skipped_task.py @@ -0,0 +1,80 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import tekton +from tekton.models.v1beta1_skipped_task import V1beta1SkippedTask # noqa: E501 +from tekton.rest import ApiException + +class TestV1beta1SkippedTask(unittest.TestCase): + """V1beta1SkippedTask unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test V1beta1SkippedTask + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = tekton.models.v1beta1_skipped_task.V1beta1SkippedTask() # noqa: E501 + if include_optional : + return V1beta1SkippedTask( + name = '0', + when_expressions = [ + tekton.models.v1beta1/when_expression.v1beta1.WhenExpression( + input = '0', + operator = '0', + values = [ + '0' + ], + input = '0', + operator = '0', + values = [ + '0' + ], ) + ] + ) + else : + return V1beta1SkippedTask( + name = '0', + ) + + def testV1beta1SkippedTask(self): + """Test V1beta1SkippedTask""" + 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/sdk/python/test/test_v1beta1_step.py b/sdk/python/test/test_v1beta1_step.py new file mode 100644 index 000000000..cd144bca1 --- /dev/null +++ b/sdk/python/test/test_v1beta1_step.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_step import V1beta1Step # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1Step(unittest.TestCase): + """V1beta1Step unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Step(self): + """Test V1beta1Step""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_step.V1beta1Step() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_step_state.py b/sdk/python/test/test_v1beta1_step_state.py new file mode 100644 index 000000000..3b42cb3f7 --- /dev/null +++ b/sdk/python/test/test_v1beta1_step_state.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_step_state import V1beta1StepState # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1StepState(unittest.TestCase): + """V1beta1StepState unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1StepState(self): + """Test V1beta1StepState""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_step_state.V1beta1StepState() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task.py b/sdk/python/test/test_v1beta1_task.py new file mode 100644 index 000000000..789a5e1d1 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task import V1beta1Task # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1Task(unittest.TestCase): + """V1beta1Task unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Task(self): + """Test V1beta1Task""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task.V1beta1Task() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_list.py b/sdk/python/test/test_v1beta1_task_list.py new file mode 100644 index 000000000..84b25c847 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_list import V1beta1TaskList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskList(unittest.TestCase): + """V1beta1TaskList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskList(self): + """Test V1beta1TaskList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_list.V1beta1TaskList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_ref.py b/sdk/python/test/test_v1beta1_task_ref.py new file mode 100644 index 000000000..b0b195ad9 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_ref.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_ref import V1beta1TaskRef # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRef(unittest.TestCase): + """V1beta1TaskRef unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRef(self): + """Test V1beta1TaskRef""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_ref.V1beta1TaskRef() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_resource.py b/sdk/python/test/test_v1beta1_task_resource.py new file mode 100644 index 000000000..34bc5ec88 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_resource.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_resource import V1beta1TaskResource # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskResource(unittest.TestCase): + """V1beta1TaskResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskResource(self): + """Test V1beta1TaskResource""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_resource.V1beta1TaskResource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_resource_binding.py b/sdk/python/test/test_v1beta1_task_resource_binding.py new file mode 100644 index 000000000..2d641a62c --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_resource_binding.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_resource_binding import V1beta1TaskResourceBinding # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskResourceBinding(unittest.TestCase): + """V1beta1TaskResourceBinding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskResourceBinding(self): + """Test V1beta1TaskResourceBinding""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_resource_binding.V1beta1TaskResourceBinding() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_resources.py b/sdk/python/test/test_v1beta1_task_resources.py new file mode 100644 index 000000000..742fac403 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_resources.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_resources import V1beta1TaskResources # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskResources(unittest.TestCase): + """V1beta1TaskResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskResources(self): + """Test V1beta1TaskResources""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_resources.V1beta1TaskResources() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_result.py b/sdk/python/test/test_v1beta1_task_result.py new file mode 100644 index 000000000..849dd24a8 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_result.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_result import V1beta1TaskResult # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskResult(unittest.TestCase): + """V1beta1TaskResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskResult(self): + """Test V1beta1TaskResult""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_result.V1beta1TaskResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run.py b/sdk/python/test/test_v1beta1_task_run.py new file mode 100644 index 000000000..a059c7148 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run import V1beta1TaskRun # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRun(unittest.TestCase): + """V1beta1TaskRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRun(self): + """Test V1beta1TaskRun""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run.V1beta1TaskRun() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_inputs.py b/sdk/python/test/test_v1beta1_task_run_inputs.py new file mode 100644 index 000000000..a31e4660b --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_inputs.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_inputs import V1beta1TaskRunInputs # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunInputs(unittest.TestCase): + """V1beta1TaskRunInputs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunInputs(self): + """Test V1beta1TaskRunInputs""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_inputs.V1beta1TaskRunInputs() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_list.py b/sdk/python/test/test_v1beta1_task_run_list.py new file mode 100644 index 000000000..48c123fcc --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_list.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_list import V1beta1TaskRunList # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunList(unittest.TestCase): + """V1beta1TaskRunList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunList(self): + """Test V1beta1TaskRunList""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_list.V1beta1TaskRunList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_outputs.py b/sdk/python/test/test_v1beta1_task_run_outputs.py new file mode 100644 index 000000000..1e9ef93b5 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_outputs.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_outputs import V1beta1TaskRunOutputs # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunOutputs(unittest.TestCase): + """V1beta1TaskRunOutputs unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunOutputs(self): + """Test V1beta1TaskRunOutputs""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_outputs.V1beta1TaskRunOutputs() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_resources.py b/sdk/python/test/test_v1beta1_task_run_resources.py new file mode 100644 index 000000000..6766cfbf9 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_resources.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_resources import V1beta1TaskRunResources # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunResources(unittest.TestCase): + """V1beta1TaskRunResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunResources(self): + """Test V1beta1TaskRunResources""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_resources.V1beta1TaskRunResources() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_result.py b/sdk/python/test/test_v1beta1_task_run_result.py new file mode 100644 index 000000000..f11d2499c --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_result.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_result import V1beta1TaskRunResult # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunResult(unittest.TestCase): + """V1beta1TaskRunResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunResult(self): + """Test V1beta1TaskRunResult""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_result.V1beta1TaskRunResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_spec.py b/sdk/python/test/test_v1beta1_task_run_spec.py new file mode 100644 index 000000000..645622feb --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_spec import V1beta1TaskRunSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunSpec(unittest.TestCase): + """V1beta1TaskRunSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunSpec(self): + """Test V1beta1TaskRunSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_spec.V1beta1TaskRunSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_status.py b/sdk/python/test/test_v1beta1_task_run_status.py new file mode 100644 index 000000000..8e026c1ab --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_status.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_status import V1beta1TaskRunStatus # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunStatus(unittest.TestCase): + """V1beta1TaskRunStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunStatus(self): + """Test V1beta1TaskRunStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_status.V1beta1TaskRunStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_run_status_fields.py b/sdk/python/test/test_v1beta1_task_run_status_fields.py new file mode 100644 index 000000000..53cdab34f --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_run_status_fields.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_run_status_fields import V1beta1TaskRunStatusFields # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskRunStatusFields(unittest.TestCase): + """V1beta1TaskRunStatusFields unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskRunStatusFields(self): + """Test V1beta1TaskRunStatusFields""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_run_status_fields.V1beta1TaskRunStatusFields() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_task_spec.py b/sdk/python/test/test_v1beta1_task_spec.py new file mode 100644 index 000000000..51f14ea05 --- /dev/null +++ b/sdk/python/test/test_v1beta1_task_spec.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_task_spec import V1beta1TaskSpec # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1TaskSpec(unittest.TestCase): + """V1beta1TaskSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TaskSpec(self): + """Test V1beta1TaskSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_task_spec.V1beta1TaskSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_when_expression.py b/sdk/python/test/test_v1beta1_when_expression.py new file mode 100644 index 000000000..e7b17da42 --- /dev/null +++ b/sdk/python/test/test_v1beta1_when_expression.py @@ -0,0 +1,80 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Tekton Pipeline # noqa: E501 + + The version of the OpenAPI document: v0.17.2 + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import tekton +from tekton.models.v1beta1_when_expression import V1beta1WhenExpression # noqa: E501 +from tekton.rest import ApiException + +class TestV1beta1WhenExpression(unittest.TestCase): + """V1beta1WhenExpression unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test V1beta1WhenExpression + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = tekton.models.v1beta1_when_expression.V1beta1WhenExpression() # noqa: E501 + if include_optional : + return V1beta1WhenExpression( + input = '0', + operator = '0', + values = [ + '0' + ], + input = '0', + operator = '0', + values = [ + '0' + ] + ) + else : + return V1beta1WhenExpression( + input = '0', + operator = '0', + values = [ + '0' + ], + ) + + def testV1beta1WhenExpression(self): + """Test V1beta1WhenExpression""" + 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/sdk/python/test/test_v1beta1_workspace_binding.py b/sdk/python/test/test_v1beta1_workspace_binding.py new file mode 100644 index 000000000..aca63c1fd --- /dev/null +++ b/sdk/python/test/test_v1beta1_workspace_binding.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_workspace_binding import V1beta1WorkspaceBinding # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1WorkspaceBinding(unittest.TestCase): + """V1beta1WorkspaceBinding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1WorkspaceBinding(self): + """Test V1beta1WorkspaceBinding""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_workspace_binding.V1beta1WorkspaceBinding() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_workspace_declaration.py b/sdk/python/test/test_v1beta1_workspace_declaration.py new file mode 100644 index 000000000..d6a9b14b7 --- /dev/null +++ b/sdk/python/test/test_v1beta1_workspace_declaration.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_workspace_declaration import V1beta1WorkspaceDeclaration # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1WorkspaceDeclaration(unittest.TestCase): + """V1beta1WorkspaceDeclaration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1WorkspaceDeclaration(self): + """Test V1beta1WorkspaceDeclaration""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_workspace_declaration.V1beta1WorkspaceDeclaration() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/test/test_v1beta1_workspace_pipeline_task_binding.py b/sdk/python/test/test_v1beta1_workspace_pipeline_task_binding.py new file mode 100644 index 000000000..953a75ebd --- /dev/null +++ b/sdk/python/test/test_v1beta1_workspace_pipeline_task_binding.py @@ -0,0 +1,54 @@ +# Copyright 2020 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# coding: utf-8 + +""" + Tekton + + Python SDK for Tekton Pipeline # noqa: E501 + + OpenAPI spec version: v0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import tekton +from tekton.models.v1beta1_workspace_pipeline_task_binding import V1beta1WorkspacePipelineTaskBinding # noqa: E501 +from tekton.rest import ApiException + + +class TestV1beta1WorkspacePipelineTaskBinding(unittest.TestCase): + """V1beta1WorkspacePipelineTaskBinding unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1WorkspacePipelineTaskBinding(self): + """Test V1beta1WorkspacePipelineTaskBinding""" + # FIXME: construct object with mandatory attributes with example values + # model = tekton.models.v1beta1_workspace_pipeline_task_binding.V1beta1WorkspacePipelineTaskBinding() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()