├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .swiftformat ├── CHANGELOG.md ├── LICENSE ├── Package.swift ├── README.md ├── Sources ├── Builders │ ├── Builders.swift │ ├── apps │ │ └── v1 │ │ │ └── appsV1+Deployment.swift │ ├── core │ │ └── v1 │ │ │ ├── coreV1+ConfigMap.swift │ │ │ ├── coreV1+Container.swift │ │ │ ├── coreV1+Namespace.swift │ │ │ ├── coreV1+Node.swift │ │ │ ├── coreV1+ObjectReference.swift │ │ │ ├── coreV1+Pod.swift │ │ │ ├── coreV1+Secret.swift │ │ │ ├── coreV1+Service.swift │ │ │ ├── coreV1+ServiceAccount.swift │ │ │ └── coreV1+Volume.swift │ └── meta │ │ └── v1 │ │ ├── metaV1+Metadata.swift │ │ ├── metaV1+Selector.swift │ │ └── metaV1+Status.swift ├── Codable │ └── Any+Codable.swift ├── Extensions │ ├── CronJobExtensions+batch.v1.swift │ └── Hashes.swift ├── Model │ ├── GroupVersionKind+DefaultResources.swift │ ├── GroupVersionKind+KubernetesAPIResource.swift │ ├── GroupVersionKind+Meta.swift │ ├── GroupVersionKind+ResourceName.swift │ ├── GroupVersionKind.swift │ ├── GroupVersionResource+DefaultResources.swift │ ├── GroupVersionResource+KubernetesAPIResource.swift │ ├── GroupVersionResource+Meta.swift │ ├── GroupVersionResource+ResourceName.swift │ ├── GroupVersionResource.swift │ ├── IntOrString.swift │ ├── JSONObject.swift │ ├── KubernetesResource.swift │ ├── Quantity.swift │ ├── UnstructuredResource.swift │ ├── UnstructuredResourceList.swift │ ├── admissionregistration │ │ ├── admissionregistration.swift │ │ ├── v1 │ │ │ ├── AuditAnnotation+admissionregistration.v1.swift │ │ │ ├── ExpressionWarning+admissionregistration.v1.swift │ │ │ ├── MatchCondition+admissionregistration.v1.swift │ │ │ ├── MatchResources+admissionregistration.v1.swift │ │ │ ├── MutatingWebhook+admissionregistration.v1.swift │ │ │ ├── MutatingWebhookConfiguration+admissionregistration.v1.swift │ │ │ ├── MutatingWebhookConfigurationList+admissionregistration.v1.swift │ │ │ ├── NamedRuleWithOperations+admissionregistration.v1.swift │ │ │ ├── ParamKind+admissionregistration.v1.swift │ │ │ ├── ParamRef+admissionregistration.v1.swift │ │ │ ├── RuleWithOperations+admissionregistration.v1.swift │ │ │ ├── ServiceReference+admissionregistration.v1.swift │ │ │ ├── TypeChecking+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicy+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicyBinding+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicyBindingList+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicyBindingSpec+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicyList+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicySpec+admissionregistration.v1.swift │ │ │ ├── ValidatingAdmissionPolicyStatus+admissionregistration.v1.swift │ │ │ ├── ValidatingWebhook+admissionregistration.v1.swift │ │ │ ├── ValidatingWebhookConfiguration+admissionregistration.v1.swift │ │ │ ├── ValidatingWebhookConfigurationList+admissionregistration.v1.swift │ │ │ ├── Validation+admissionregistration.v1.swift │ │ │ ├── Variable+admissionregistration.v1.swift │ │ │ ├── WebhookClientConfig+admissionregistration.v1.swift │ │ │ └── admissionregistration+v1.swift │ │ ├── v1alpha1 │ │ │ ├── ApplyConfiguration+admissionregistration.v1alpha1.swift │ │ │ ├── JSONPatch+admissionregistration.v1alpha1.swift │ │ │ ├── MatchCondition+admissionregistration.v1alpha1.swift │ │ │ ├── MatchResources+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicy+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicyBinding+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicyBindingList+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicyBindingSpec+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicyList+admissionregistration.v1alpha1.swift │ │ │ ├── MutatingAdmissionPolicySpec+admissionregistration.v1alpha1.swift │ │ │ ├── Mutation+admissionregistration.v1alpha1.swift │ │ │ ├── NamedRuleWithOperations+admissionregistration.v1alpha1.swift │ │ │ ├── ParamKind+admissionregistration.v1alpha1.swift │ │ │ ├── ParamRef+admissionregistration.v1alpha1.swift │ │ │ ├── Variable+admissionregistration.v1alpha1.swift │ │ │ └── admissionregistration+v1alpha1.swift │ │ └── v1beta1 │ │ │ ├── AuditAnnotation+admissionregistration.v1beta1.swift │ │ │ ├── ExpressionWarning+admissionregistration.v1beta1.swift │ │ │ ├── MatchCondition+admissionregistration.v1beta1.swift │ │ │ ├── MatchResources+admissionregistration.v1beta1.swift │ │ │ ├── NamedRuleWithOperations+admissionregistration.v1beta1.swift │ │ │ ├── ParamKind+admissionregistration.v1beta1.swift │ │ │ ├── ParamRef+admissionregistration.v1beta1.swift │ │ │ ├── TypeChecking+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicy+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicyBinding+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicyBindingList+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicyBindingSpec+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicyList+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicySpec+admissionregistration.v1beta1.swift │ │ │ ├── ValidatingAdmissionPolicyStatus+admissionregistration.v1beta1.swift │ │ │ ├── Validation+admissionregistration.v1beta1.swift │ │ │ ├── Variable+admissionregistration.v1beta1.swift │ │ │ └── admissionregistration+v1beta1.swift │ ├── apiextensions │ │ ├── apiextensions.swift │ │ └── v1 │ │ │ ├── CustomResourceColumnDefinition+apiextensions.v1.swift │ │ │ ├── CustomResourceConversion+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinition+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionCondition+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionList+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionNames+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionSpec+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionStatus+apiextensions.v1.swift │ │ │ ├── CustomResourceDefinitionVersion+apiextensions.v1.swift │ │ │ ├── CustomResourceSubresourceScale+apiextensions.v1.swift │ │ │ ├── CustomResourceSubresourceStatus+apiextensions.v1.swift │ │ │ ├── CustomResourceSubresources+apiextensions.v1.swift │ │ │ ├── CustomResourceValidation+apiextensions.v1.swift │ │ │ ├── ExternalDocumentation+apiextensions.v1.swift │ │ │ ├── SelectableField+apiextensions.v1.swift │ │ │ ├── ServiceReference+apiextensions.v1.swift │ │ │ ├── ValidationRule+apiextensions.v1.swift │ │ │ ├── WebhookClientConfig+apiextensions.v1.swift │ │ │ ├── WebhookConversion+apiextensions.v1.swift │ │ │ └── apiextensions+v1.swift │ ├── apiregistration │ │ ├── apiregistration.swift │ │ └── v1 │ │ │ ├── APIService+apiregistration.v1.swift │ │ │ ├── APIServiceCondition+apiregistration.v1.swift │ │ │ ├── APIServiceList+apiregistration.v1.swift │ │ │ ├── APIServiceSpec+apiregistration.v1.swift │ │ │ ├── APIServiceStatus+apiregistration.v1.swift │ │ │ ├── ServiceReference+apiregistration.v1.swift │ │ │ └── apiregistration+v1.swift │ ├── apps │ │ ├── apps.swift │ │ └── v1 │ │ │ ├── ControllerRevision+apps.v1.swift │ │ │ ├── ControllerRevisionList+apps.v1.swift │ │ │ ├── DaemonSet+apps.v1.swift │ │ │ ├── DaemonSetCondition+apps.v1.swift │ │ │ ├── DaemonSetList+apps.v1.swift │ │ │ ├── DaemonSetSpec+apps.v1.swift │ │ │ ├── DaemonSetStatus+apps.v1.swift │ │ │ ├── DaemonSetUpdateStrategy+apps.v1.swift │ │ │ ├── Deployment+apps.v1.swift │ │ │ ├── DeploymentCondition+apps.v1.swift │ │ │ ├── DeploymentList+apps.v1.swift │ │ │ ├── DeploymentSpec+apps.v1.swift │ │ │ ├── DeploymentStatus+apps.v1.swift │ │ │ ├── DeploymentStrategy+apps.v1.swift │ │ │ ├── ReplicaSet+apps.v1.swift │ │ │ ├── ReplicaSetCondition+apps.v1.swift │ │ │ ├── ReplicaSetList+apps.v1.swift │ │ │ ├── ReplicaSetSpec+apps.v1.swift │ │ │ ├── ReplicaSetStatus+apps.v1.swift │ │ │ ├── RollingUpdateDaemonSet+apps.v1.swift │ │ │ ├── RollingUpdateDeployment+apps.v1.swift │ │ │ ├── RollingUpdateStatefulSetStrategy+apps.v1.swift │ │ │ ├── StatefulSet+apps.v1.swift │ │ │ ├── StatefulSetCondition+apps.v1.swift │ │ │ ├── StatefulSetList+apps.v1.swift │ │ │ ├── StatefulSetOrdinals+apps.v1.swift │ │ │ ├── StatefulSetPersistentVolumeClaimRetentionPolicy+apps.v1.swift │ │ │ ├── StatefulSetSpec+apps.v1.swift │ │ │ ├── StatefulSetStatus+apps.v1.swift │ │ │ ├── StatefulSetUpdateStrategy+apps.v1.swift │ │ │ └── apps+v1.swift │ ├── authentication │ │ ├── authentication.swift │ │ ├── v1 │ │ │ ├── BoundObjectReference+authentication.v1.swift │ │ │ ├── SelfSubjectReview+authentication.v1.swift │ │ │ ├── SelfSubjectReviewStatus+authentication.v1.swift │ │ │ ├── TokenRequest+authentication.v1.swift │ │ │ ├── TokenRequestSpec+authentication.v1.swift │ │ │ ├── TokenRequestStatus+authentication.v1.swift │ │ │ ├── TokenReview+authentication.v1.swift │ │ │ ├── TokenReviewSpec+authentication.v1.swift │ │ │ ├── TokenReviewStatus+authentication.v1.swift │ │ │ ├── UserInfo+authentication.v1.swift │ │ │ └── authentication+v1.swift │ │ └── v1beta1 │ │ │ ├── SelfSubjectReview+authentication.v1beta1.swift │ │ │ ├── SelfSubjectReviewStatus+authentication.v1beta1.swift │ │ │ └── authentication+v1beta1.swift │ ├── authorization │ │ ├── authorization.swift │ │ └── v1 │ │ │ ├── FieldSelectorAttributes+authorization.v1.swift │ │ │ ├── LabelSelectorAttributes+authorization.v1.swift │ │ │ ├── LocalSubjectAccessReview+authorization.v1.swift │ │ │ ├── NonResourceAttributes+authorization.v1.swift │ │ │ ├── NonResourceRule+authorization.v1.swift │ │ │ ├── ResourceAttributes+authorization.v1.swift │ │ │ ├── ResourceRule+authorization.v1.swift │ │ │ ├── SelfSubjectAccessReview+authorization.v1.swift │ │ │ ├── SelfSubjectAccessReviewSpec+authorization.v1.swift │ │ │ ├── SelfSubjectRulesReview+authorization.v1.swift │ │ │ ├── SelfSubjectRulesReviewSpec+authorization.v1.swift │ │ │ ├── SubjectAccessReview+authorization.v1.swift │ │ │ ├── SubjectAccessReviewSpec+authorization.v1.swift │ │ │ ├── SubjectAccessReviewStatus+authorization.v1.swift │ │ │ ├── SubjectRulesReviewStatus+authorization.v1.swift │ │ │ └── authorization+v1.swift │ ├── autoscaling │ │ ├── autoscaling.swift │ │ ├── v1 │ │ │ ├── CrossVersionObjectReference+autoscaling.v1.swift │ │ │ ├── HorizontalPodAutoscaler+autoscaling.v1.swift │ │ │ ├── HorizontalPodAutoscalerList+autoscaling.v1.swift │ │ │ ├── HorizontalPodAutoscalerSpec+autoscaling.v1.swift │ │ │ ├── HorizontalPodAutoscalerStatus+autoscaling.v1.swift │ │ │ ├── Scale+autoscaling.v1.swift │ │ │ ├── ScaleSpec+autoscaling.v1.swift │ │ │ ├── ScaleStatus+autoscaling.v1.swift │ │ │ └── autoscaling+v1.swift │ │ └── v2 │ │ │ ├── ContainerResourceMetricSource+autoscaling.v2.swift │ │ │ ├── ContainerResourceMetricStatus+autoscaling.v2.swift │ │ │ ├── CrossVersionObjectReference+autoscaling.v2.swift │ │ │ ├── ExternalMetricSource+autoscaling.v2.swift │ │ │ ├── ExternalMetricStatus+autoscaling.v2.swift │ │ │ ├── HPAScalingPolicy+autoscaling.v2.swift │ │ │ ├── HPAScalingRules+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscaler+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscalerBehavior+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscalerCondition+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscalerList+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscalerSpec+autoscaling.v2.swift │ │ │ ├── HorizontalPodAutoscalerStatus+autoscaling.v2.swift │ │ │ ├── MetricIdentifier+autoscaling.v2.swift │ │ │ ├── MetricSpec+autoscaling.v2.swift │ │ │ ├── MetricStatus+autoscaling.v2.swift │ │ │ ├── MetricTarget+autoscaling.v2.swift │ │ │ ├── MetricValueStatus+autoscaling.v2.swift │ │ │ ├── ObjectMetricSource+autoscaling.v2.swift │ │ │ ├── ObjectMetricStatus+autoscaling.v2.swift │ │ │ ├── PodsMetricSource+autoscaling.v2.swift │ │ │ ├── PodsMetricStatus+autoscaling.v2.swift │ │ │ ├── ResourceMetricSource+autoscaling.v2.swift │ │ │ ├── ResourceMetricStatus+autoscaling.v2.swift │ │ │ └── autoscaling+v2.swift │ ├── batch │ │ ├── batch.swift │ │ └── v1 │ │ │ ├── CronJob+batch.v1.swift │ │ │ ├── CronJobList+batch.v1.swift │ │ │ ├── CronJobSpec+batch.v1.swift │ │ │ ├── CronJobStatus+batch.v1.swift │ │ │ ├── Job+batch.v1.swift │ │ │ ├── JobCondition+batch.v1.swift │ │ │ ├── JobList+batch.v1.swift │ │ │ ├── JobSpec+batch.v1.swift │ │ │ ├── JobStatus+batch.v1.swift │ │ │ ├── JobTemplateSpec+batch.v1.swift │ │ │ ├── PodFailurePolicy+batch.v1.swift │ │ │ ├── PodFailurePolicyOnExitCodesRequirement+batch.v1.swift │ │ │ ├── PodFailurePolicyOnPodConditionsPattern+batch.v1.swift │ │ │ ├── PodFailurePolicyRule+batch.v1.swift │ │ │ ├── SuccessPolicy+batch.v1.swift │ │ │ ├── SuccessPolicyRule+batch.v1.swift │ │ │ ├── UncountedTerminatedPods+batch.v1.swift │ │ │ └── batch+v1.swift │ ├── certificates │ │ ├── certificates.swift │ │ ├── v1 │ │ │ ├── CertificateSigningRequest+certificates.v1.swift │ │ │ ├── CertificateSigningRequestCondition+certificates.v1.swift │ │ │ ├── CertificateSigningRequestList+certificates.v1.swift │ │ │ ├── CertificateSigningRequestSpec+certificates.v1.swift │ │ │ ├── CertificateSigningRequestStatus+certificates.v1.swift │ │ │ └── certificates+v1.swift │ │ └── v1alpha1 │ │ │ ├── ClusterTrustBundle+certificates.v1alpha1.swift │ │ │ ├── ClusterTrustBundleList+certificates.v1alpha1.swift │ │ │ ├── ClusterTrustBundleSpec+certificates.v1alpha1.swift │ │ │ └── certificates+v1alpha1.swift │ ├── coordination │ │ ├── coordination.swift │ │ ├── v1 │ │ │ ├── Lease+coordination.v1.swift │ │ │ ├── LeaseList+coordination.v1.swift │ │ │ ├── LeaseSpec+coordination.v1.swift │ │ │ └── coordination+v1.swift │ │ └── v1alpha2 │ │ │ ├── LeaseCandidate+coordination.v1alpha2.swift │ │ │ ├── LeaseCandidateList+coordination.v1alpha2.swift │ │ │ ├── LeaseCandidateSpec+coordination.v1alpha2.swift │ │ │ └── coordination+v1alpha2.swift │ ├── core │ │ ├── core.swift │ │ └── v1 │ │ │ ├── AWSElasticBlockStoreVolumeSource+core.v1.swift │ │ │ ├── Affinity+core.v1.swift │ │ │ ├── AppArmorProfile+core.v1.swift │ │ │ ├── AttachedVolume+core.v1.swift │ │ │ ├── AzureDiskVolumeSource+core.v1.swift │ │ │ ├── AzureFilePersistentVolumeSource+core.v1.swift │ │ │ ├── AzureFileVolumeSource+core.v1.swift │ │ │ ├── Binding+core.v1.swift │ │ │ ├── CSIPersistentVolumeSource+core.v1.swift │ │ │ ├── CSIVolumeSource+core.v1.swift │ │ │ ├── Capabilities+core.v1.swift │ │ │ ├── CephFSPersistentVolumeSource+core.v1.swift │ │ │ ├── CephFSVolumeSource+core.v1.swift │ │ │ ├── CinderPersistentVolumeSource+core.v1.swift │ │ │ ├── CinderVolumeSource+core.v1.swift │ │ │ ├── ClientIPConfig+core.v1.swift │ │ │ ├── ClusterTrustBundleProjection+core.v1.swift │ │ │ ├── ComponentCondition+core.v1.swift │ │ │ ├── ComponentStatus+core.v1.swift │ │ │ ├── ComponentStatusList+core.v1.swift │ │ │ ├── ConfigMap+core.v1.swift │ │ │ ├── ConfigMapEnvSource+core.v1.swift │ │ │ ├── ConfigMapKeySelector+core.v1.swift │ │ │ ├── ConfigMapList+core.v1.swift │ │ │ ├── ConfigMapNodeConfigSource+core.v1.swift │ │ │ ├── ConfigMapProjection+core.v1.swift │ │ │ ├── ConfigMapVolumeSource+core.v1.swift │ │ │ ├── Container+core.v1.swift │ │ │ ├── ContainerImage+core.v1.swift │ │ │ ├── ContainerPort+core.v1.swift │ │ │ ├── ContainerResizePolicy+core.v1.swift │ │ │ ├── ContainerState+core.v1.swift │ │ │ ├── ContainerStateRunning+core.v1.swift │ │ │ ├── ContainerStateTerminated+core.v1.swift │ │ │ ├── ContainerStateWaiting+core.v1.swift │ │ │ ├── ContainerStatus+core.v1.swift │ │ │ ├── ContainerUser+core.v1.swift │ │ │ ├── DaemonEndpoint+core.v1.swift │ │ │ ├── DownwardAPIProjection+core.v1.swift │ │ │ ├── DownwardAPIVolumeFile+core.v1.swift │ │ │ ├── DownwardAPIVolumeSource+core.v1.swift │ │ │ ├── EmptyDirVolumeSource+core.v1.swift │ │ │ ├── EndpointAddress+core.v1.swift │ │ │ ├── EndpointPort+core.v1.swift │ │ │ ├── EndpointSubset+core.v1.swift │ │ │ ├── Endpoints+core.v1.swift │ │ │ ├── EndpointsList+core.v1.swift │ │ │ ├── EnvFromSource+core.v1.swift │ │ │ ├── EnvVar+core.v1.swift │ │ │ ├── EnvVarSource+core.v1.swift │ │ │ ├── EphemeralContainer+core.v1.swift │ │ │ ├── EphemeralVolumeSource+core.v1.swift │ │ │ ├── Event+core.v1.swift │ │ │ ├── EventList+core.v1.swift │ │ │ ├── EventSeries+core.v1.swift │ │ │ ├── EventSource+core.v1.swift │ │ │ ├── ExecAction+core.v1.swift │ │ │ ├── FCVolumeSource+core.v1.swift │ │ │ ├── FlexPersistentVolumeSource+core.v1.swift │ │ │ ├── FlexVolumeSource+core.v1.swift │ │ │ ├── FlockerVolumeSource+core.v1.swift │ │ │ ├── GCEPersistentDiskVolumeSource+core.v1.swift │ │ │ ├── GRPCAction+core.v1.swift │ │ │ ├── GitRepoVolumeSource+core.v1.swift │ │ │ ├── GlusterfsPersistentVolumeSource+core.v1.swift │ │ │ ├── GlusterfsVolumeSource+core.v1.swift │ │ │ ├── HTTPGetAction+core.v1.swift │ │ │ ├── HTTPHeader+core.v1.swift │ │ │ ├── HostAlias+core.v1.swift │ │ │ ├── HostIP+core.v1.swift │ │ │ ├── HostPathVolumeSource+core.v1.swift │ │ │ ├── ISCSIPersistentVolumeSource+core.v1.swift │ │ │ ├── ISCSIVolumeSource+core.v1.swift │ │ │ ├── ImageVolumeSource+core.v1.swift │ │ │ ├── KeyToPath+core.v1.swift │ │ │ ├── Lifecycle+core.v1.swift │ │ │ ├── LifecycleHandler+core.v1.swift │ │ │ ├── LimitRange+core.v1.swift │ │ │ ├── LimitRangeItem+core.v1.swift │ │ │ ├── LimitRangeList+core.v1.swift │ │ │ ├── LimitRangeSpec+core.v1.swift │ │ │ ├── LinuxContainerUser+core.v1.swift │ │ │ ├── LoadBalancerIngress+core.v1.swift │ │ │ ├── LoadBalancerStatus+core.v1.swift │ │ │ ├── LocalObjectReference+core.v1.swift │ │ │ ├── LocalVolumeSource+core.v1.swift │ │ │ ├── ModifyVolumeStatus+core.v1.swift │ │ │ ├── NFSVolumeSource+core.v1.swift │ │ │ ├── Namespace+core.v1.swift │ │ │ ├── NamespaceCondition+core.v1.swift │ │ │ ├── NamespaceList+core.v1.swift │ │ │ ├── NamespaceSpec+core.v1.swift │ │ │ ├── NamespaceStatus+core.v1.swift │ │ │ ├── Node+core.v1.swift │ │ │ ├── NodeAddress+core.v1.swift │ │ │ ├── NodeAffinity+core.v1.swift │ │ │ ├── NodeCondition+core.v1.swift │ │ │ ├── NodeConfigSource+core.v1.swift │ │ │ ├── NodeConfigStatus+core.v1.swift │ │ │ ├── NodeDaemonEndpoints+core.v1.swift │ │ │ ├── NodeFeatures+core.v1.swift │ │ │ ├── NodeList+core.v1.swift │ │ │ ├── NodeRuntimeHandler+core.v1.swift │ │ │ ├── NodeRuntimeHandlerFeatures+core.v1.swift │ │ │ ├── NodeSelector+core.v1.swift │ │ │ ├── NodeSelectorRequirement+core.v1.swift │ │ │ ├── NodeSelectorTerm+core.v1.swift │ │ │ ├── NodeSpec+core.v1.swift │ │ │ ├── NodeStatus+core.v1.swift │ │ │ ├── NodeSystemInfo+core.v1.swift │ │ │ ├── ObjectFieldSelector+core.v1.swift │ │ │ ├── ObjectReference+core.v1.swift │ │ │ ├── PersistentVolume+core.v1.swift │ │ │ ├── PersistentVolumeClaim+core.v1.swift │ │ │ ├── PersistentVolumeClaimCondition+core.v1.swift │ │ │ ├── PersistentVolumeClaimList+core.v1.swift │ │ │ ├── PersistentVolumeClaimSpec+core.v1.swift │ │ │ ├── PersistentVolumeClaimStatus+core.v1.swift │ │ │ ├── PersistentVolumeClaimTemplate+core.v1.swift │ │ │ ├── PersistentVolumeClaimVolumeSource+core.v1.swift │ │ │ ├── PersistentVolumeList+core.v1.swift │ │ │ ├── PersistentVolumeSpec+core.v1.swift │ │ │ ├── PersistentVolumeStatus+core.v1.swift │ │ │ ├── PhotonPersistentDiskVolumeSource+core.v1.swift │ │ │ ├── Pod+core.v1.swift │ │ │ ├── PodAffinity+core.v1.swift │ │ │ ├── PodAffinityTerm+core.v1.swift │ │ │ ├── PodAntiAffinity+core.v1.swift │ │ │ ├── PodCondition+core.v1.swift │ │ │ ├── PodDNSConfig+core.v1.swift │ │ │ ├── PodDNSConfigOption+core.v1.swift │ │ │ ├── PodIP+core.v1.swift │ │ │ ├── PodList+core.v1.swift │ │ │ ├── PodOS+core.v1.swift │ │ │ ├── PodReadinessGate+core.v1.swift │ │ │ ├── PodResourceClaim+core.v1.swift │ │ │ ├── PodResourceClaimStatus+core.v1.swift │ │ │ ├── PodSchedulingGate+core.v1.swift │ │ │ ├── PodSecurityContext+core.v1.swift │ │ │ ├── PodSpec+core.v1.swift │ │ │ ├── PodStatus+core.v1.swift │ │ │ ├── PodTemplate+core.v1.swift │ │ │ ├── PodTemplateList+core.v1.swift │ │ │ ├── PodTemplateSpec+core.v1.swift │ │ │ ├── PortStatus+core.v1.swift │ │ │ ├── PortworxVolumeSource+core.v1.swift │ │ │ ├── PreferredSchedulingTerm+core.v1.swift │ │ │ ├── Probe+core.v1.swift │ │ │ ├── ProjectedVolumeSource+core.v1.swift │ │ │ ├── QuobyteVolumeSource+core.v1.swift │ │ │ ├── RBDPersistentVolumeSource+core.v1.swift │ │ │ ├── RBDVolumeSource+core.v1.swift │ │ │ ├── ReplicationController+core.v1.swift │ │ │ ├── ReplicationControllerCondition+core.v1.swift │ │ │ ├── ReplicationControllerList+core.v1.swift │ │ │ ├── ReplicationControllerSpec+core.v1.swift │ │ │ ├── ReplicationControllerStatus+core.v1.swift │ │ │ ├── ResourceClaim+core.v1.swift │ │ │ ├── ResourceFieldSelector+core.v1.swift │ │ │ ├── ResourceHealth+core.v1.swift │ │ │ ├── ResourceQuota+core.v1.swift │ │ │ ├── ResourceQuotaList+core.v1.swift │ │ │ ├── ResourceQuotaSpec+core.v1.swift │ │ │ ├── ResourceQuotaStatus+core.v1.swift │ │ │ ├── ResourceRequirements+core.v1.swift │ │ │ ├── ResourceStatus+core.v1.swift │ │ │ ├── SELinuxOptions+core.v1.swift │ │ │ ├── ScaleIOPersistentVolumeSource+core.v1.swift │ │ │ ├── ScaleIOVolumeSource+core.v1.swift │ │ │ ├── ScopeSelector+core.v1.swift │ │ │ ├── ScopedResourceSelectorRequirement+core.v1.swift │ │ │ ├── SeccompProfile+core.v1.swift │ │ │ ├── Secret+core.v1.swift │ │ │ ├── SecretEnvSource+core.v1.swift │ │ │ ├── SecretKeySelector+core.v1.swift │ │ │ ├── SecretList+core.v1.swift │ │ │ ├── SecretProjection+core.v1.swift │ │ │ ├── SecretReference+core.v1.swift │ │ │ ├── SecretVolumeSource+core.v1.swift │ │ │ ├── SecurityContext+core.v1.swift │ │ │ ├── Service+core.v1.swift │ │ │ ├── ServiceAccount+core.v1.swift │ │ │ ├── ServiceAccountList+core.v1.swift │ │ │ ├── ServiceAccountTokenProjection+core.v1.swift │ │ │ ├── ServiceList+core.v1.swift │ │ │ ├── ServicePort+core.v1.swift │ │ │ ├── ServiceSpec+core.v1.swift │ │ │ ├── ServiceStatus+core.v1.swift │ │ │ ├── SessionAffinityConfig+core.v1.swift │ │ │ ├── SleepAction+core.v1.swift │ │ │ ├── StorageOSPersistentVolumeSource+core.v1.swift │ │ │ ├── StorageOSVolumeSource+core.v1.swift │ │ │ ├── Sysctl+core.v1.swift │ │ │ ├── TCPSocketAction+core.v1.swift │ │ │ ├── Taint+core.v1.swift │ │ │ ├── Toleration+core.v1.swift │ │ │ ├── TopologySelectorLabelRequirement+core.v1.swift │ │ │ ├── TopologySelectorTerm+core.v1.swift │ │ │ ├── TopologySpreadConstraint+core.v1.swift │ │ │ ├── TypedLocalObjectReference+core.v1.swift │ │ │ ├── TypedObjectReference+core.v1.swift │ │ │ ├── Volume+core.v1.swift │ │ │ ├── VolumeDevice+core.v1.swift │ │ │ ├── VolumeMount+core.v1.swift │ │ │ ├── VolumeMountStatus+core.v1.swift │ │ │ ├── VolumeNodeAffinity+core.v1.swift │ │ │ ├── VolumeProjection+core.v1.swift │ │ │ ├── VolumeResourceRequirements+core.v1.swift │ │ │ ├── VsphereVirtualDiskVolumeSource+core.v1.swift │ │ │ ├── WeightedPodAffinityTerm+core.v1.swift │ │ │ ├── WindowsSecurityContextOptions+core.v1.swift │ │ │ └── core+v1.swift │ ├── discovery │ │ ├── discovery.swift │ │ └── v1 │ │ │ ├── Endpoint+discovery.v1.swift │ │ │ ├── EndpointConditions+discovery.v1.swift │ │ │ ├── EndpointHints+discovery.v1.swift │ │ │ ├── EndpointPort+discovery.v1.swift │ │ │ ├── EndpointSlice+discovery.v1.swift │ │ │ ├── EndpointSliceList+discovery.v1.swift │ │ │ ├── ForZone+discovery.v1.swift │ │ │ └── discovery+v1.swift │ ├── events │ │ ├── events.swift │ │ └── v1 │ │ │ ├── Event+events.v1.swift │ │ │ ├── EventList+events.v1.swift │ │ │ ├── EventSeries+events.v1.swift │ │ │ └── events+v1.swift │ ├── flowcontrol │ │ ├── flowcontrol.swift │ │ └── v1 │ │ │ ├── ExemptPriorityLevelConfiguration+flowcontrol.v1.swift │ │ │ ├── FlowDistinguisherMethod+flowcontrol.v1.swift │ │ │ ├── FlowSchema+flowcontrol.v1.swift │ │ │ ├── FlowSchemaCondition+flowcontrol.v1.swift │ │ │ ├── FlowSchemaList+flowcontrol.v1.swift │ │ │ ├── FlowSchemaSpec+flowcontrol.v1.swift │ │ │ ├── FlowSchemaStatus+flowcontrol.v1.swift │ │ │ ├── GroupSubject+flowcontrol.v1.swift │ │ │ ├── LimitResponse+flowcontrol.v1.swift │ │ │ ├── LimitedPriorityLevelConfiguration+flowcontrol.v1.swift │ │ │ ├── NonResourcePolicyRule+flowcontrol.v1.swift │ │ │ ├── PolicyRulesWithSubjects+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfiguration+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfigurationCondition+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfigurationList+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfigurationReference+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfigurationSpec+flowcontrol.v1.swift │ │ │ ├── PriorityLevelConfigurationStatus+flowcontrol.v1.swift │ │ │ ├── QueuingConfiguration+flowcontrol.v1.swift │ │ │ ├── ResourcePolicyRule+flowcontrol.v1.swift │ │ │ ├── ServiceAccountSubject+flowcontrol.v1.swift │ │ │ ├── Subject+flowcontrol.v1.swift │ │ │ ├── UserSubject+flowcontrol.v1.swift │ │ │ └── flowcontrol+v1.swift │ ├── internal │ │ ├── internal.swift │ │ └── v1alpha1 │ │ │ ├── ServerStorageVersion+internal.v1alpha1.swift │ │ │ ├── StorageVersion+internal.v1alpha1.swift │ │ │ ├── StorageVersionCondition+internal.v1alpha1.swift │ │ │ ├── StorageVersionList+internal.v1alpha1.swift │ │ │ ├── StorageVersionSpec+internal.v1alpha1.swift │ │ │ ├── StorageVersionStatus+internal.v1alpha1.swift │ │ │ └── internal+v1alpha1.swift │ ├── meta │ │ ├── meta.swift │ │ └── v1 │ │ │ ├── APIGroup+meta.v1.swift │ │ │ ├── APIGroupList+meta.v1.swift │ │ │ ├── APIResource+meta.v1.swift │ │ │ ├── APIResourceList+meta.v1.swift │ │ │ ├── APIVersions+meta.v1.swift │ │ │ ├── Condition+meta.v1.swift │ │ │ ├── DeleteOptions+meta.v1.swift │ │ │ ├── FieldSelectorRequirement+meta.v1.swift │ │ │ ├── GroupVersionForDiscovery+meta.v1.swift │ │ │ ├── LabelSelector+meta.v1.swift │ │ │ ├── LabelSelectorRequirement+meta.v1.swift │ │ │ ├── ListMeta+meta.v1.swift │ │ │ ├── ManagedFieldsEntry+meta.v1.swift │ │ │ ├── ObjectMeta+meta.v1.swift │ │ │ ├── OwnerReference+meta.v1.swift │ │ │ ├── Preconditions+meta.v1.swift │ │ │ ├── ServerAddressByClientCIDR+meta.v1.swift │ │ │ ├── Status+meta.v1.swift │ │ │ ├── StatusCause+meta.v1.swift │ │ │ ├── StatusDetails+meta.v1.swift │ │ │ ├── WatchEvent+meta.v1.swift │ │ │ └── meta+v1.swift │ ├── networking │ │ ├── networking.swift │ │ ├── v1 │ │ │ ├── HTTPIngressPath+networking.v1.swift │ │ │ ├── HTTPIngressRuleValue+networking.v1.swift │ │ │ ├── IPBlock+networking.v1.swift │ │ │ ├── Ingress+networking.v1.swift │ │ │ ├── IngressBackend+networking.v1.swift │ │ │ ├── IngressClass+networking.v1.swift │ │ │ ├── IngressClassList+networking.v1.swift │ │ │ ├── IngressClassParametersReference+networking.v1.swift │ │ │ ├── IngressClassSpec+networking.v1.swift │ │ │ ├── IngressList+networking.v1.swift │ │ │ ├── IngressLoadBalancerIngress+networking.v1.swift │ │ │ ├── IngressLoadBalancerStatus+networking.v1.swift │ │ │ ├── IngressPortStatus+networking.v1.swift │ │ │ ├── IngressRule+networking.v1.swift │ │ │ ├── IngressServiceBackend+networking.v1.swift │ │ │ ├── IngressSpec+networking.v1.swift │ │ │ ├── IngressStatus+networking.v1.swift │ │ │ ├── IngressTLS+networking.v1.swift │ │ │ ├── NetworkPolicy+networking.v1.swift │ │ │ ├── NetworkPolicyEgressRule+networking.v1.swift │ │ │ ├── NetworkPolicyIngressRule+networking.v1.swift │ │ │ ├── NetworkPolicyList+networking.v1.swift │ │ │ ├── NetworkPolicyPeer+networking.v1.swift │ │ │ ├── NetworkPolicyPort+networking.v1.swift │ │ │ ├── NetworkPolicySpec+networking.v1.swift │ │ │ ├── ServiceBackendPort+networking.v1.swift │ │ │ └── networking+v1.swift │ │ └── v1beta1 │ │ │ ├── IPAddress+networking.v1beta1.swift │ │ │ ├── IPAddressList+networking.v1beta1.swift │ │ │ ├── IPAddressSpec+networking.v1beta1.swift │ │ │ ├── ParentReference+networking.v1beta1.swift │ │ │ ├── ServiceCIDR+networking.v1beta1.swift │ │ │ ├── ServiceCIDRList+networking.v1beta1.swift │ │ │ ├── ServiceCIDRSpec+networking.v1beta1.swift │ │ │ ├── ServiceCIDRStatus+networking.v1beta1.swift │ │ │ └── networking+v1beta1.swift │ ├── node │ │ ├── node.swift │ │ └── v1 │ │ │ ├── Overhead+node.v1.swift │ │ │ ├── RuntimeClass+node.v1.swift │ │ │ ├── RuntimeClassList+node.v1.swift │ │ │ ├── Scheduling+node.v1.swift │ │ │ └── node+v1.swift │ ├── policy │ │ ├── policy.swift │ │ └── v1 │ │ │ ├── Eviction+policy.v1.swift │ │ │ ├── PodDisruptionBudget+policy.v1.swift │ │ │ ├── PodDisruptionBudgetList+policy.v1.swift │ │ │ ├── PodDisruptionBudgetSpec+policy.v1.swift │ │ │ ├── PodDisruptionBudgetStatus+policy.v1.swift │ │ │ └── policy+v1.swift │ ├── rbac │ │ ├── rbac.swift │ │ └── v1 │ │ │ ├── AggregationRule+rbac.v1.swift │ │ │ ├── ClusterRole+rbac.v1.swift │ │ │ ├── ClusterRoleBinding+rbac.v1.swift │ │ │ ├── ClusterRoleBindingList+rbac.v1.swift │ │ │ ├── ClusterRoleList+rbac.v1.swift │ │ │ ├── PolicyRule+rbac.v1.swift │ │ │ ├── Role+rbac.v1.swift │ │ │ ├── RoleBinding+rbac.v1.swift │ │ │ ├── RoleBindingList+rbac.v1.swift │ │ │ ├── RoleList+rbac.v1.swift │ │ │ ├── RoleRef+rbac.v1.swift │ │ │ ├── Subject+rbac.v1.swift │ │ │ └── rbac+v1.swift │ ├── resource │ │ ├── resource.swift │ │ ├── v1alpha3 │ │ │ ├── AllocatedDeviceStatus+resource.v1alpha3.swift │ │ │ ├── AllocationResult+resource.v1alpha3.swift │ │ │ ├── BasicDevice+resource.v1alpha3.swift │ │ │ ├── CELDeviceSelector+resource.v1alpha3.swift │ │ │ ├── Device+resource.v1alpha3.swift │ │ │ ├── DeviceAllocationConfiguration+resource.v1alpha3.swift │ │ │ ├── DeviceAllocationResult+resource.v1alpha3.swift │ │ │ ├── DeviceAttribute+resource.v1alpha3.swift │ │ │ ├── DeviceClaim+resource.v1alpha3.swift │ │ │ ├── DeviceClaimConfiguration+resource.v1alpha3.swift │ │ │ ├── DeviceClass+resource.v1alpha3.swift │ │ │ ├── DeviceClassConfiguration+resource.v1alpha3.swift │ │ │ ├── DeviceClassList+resource.v1alpha3.swift │ │ │ ├── DeviceClassSpec+resource.v1alpha3.swift │ │ │ ├── DeviceConstraint+resource.v1alpha3.swift │ │ │ ├── DeviceRequest+resource.v1alpha3.swift │ │ │ ├── DeviceRequestAllocationResult+resource.v1alpha3.swift │ │ │ ├── DeviceSelector+resource.v1alpha3.swift │ │ │ ├── NetworkDeviceData+resource.v1alpha3.swift │ │ │ ├── OpaqueDeviceConfiguration+resource.v1alpha3.swift │ │ │ ├── ResourceClaim+resource.v1alpha3.swift │ │ │ ├── ResourceClaimConsumerReference+resource.v1alpha3.swift │ │ │ ├── ResourceClaimList+resource.v1alpha3.swift │ │ │ ├── ResourceClaimSpec+resource.v1alpha3.swift │ │ │ ├── ResourceClaimStatus+resource.v1alpha3.swift │ │ │ ├── ResourceClaimTemplate+resource.v1alpha3.swift │ │ │ ├── ResourceClaimTemplateList+resource.v1alpha3.swift │ │ │ ├── ResourceClaimTemplateSpec+resource.v1alpha3.swift │ │ │ ├── ResourcePool+resource.v1alpha3.swift │ │ │ ├── ResourceSlice+resource.v1alpha3.swift │ │ │ ├── ResourceSliceList+resource.v1alpha3.swift │ │ │ ├── ResourceSliceSpec+resource.v1alpha3.swift │ │ │ └── resource+v1alpha3.swift │ │ └── v1beta1 │ │ │ ├── AllocatedDeviceStatus+resource.v1beta1.swift │ │ │ ├── AllocationResult+resource.v1beta1.swift │ │ │ ├── BasicDevice+resource.v1beta1.swift │ │ │ ├── CELDeviceSelector+resource.v1beta1.swift │ │ │ ├── Device+resource.v1beta1.swift │ │ │ ├── DeviceAllocationConfiguration+resource.v1beta1.swift │ │ │ ├── DeviceAllocationResult+resource.v1beta1.swift │ │ │ ├── DeviceAttribute+resource.v1beta1.swift │ │ │ ├── DeviceCapacity+resource.v1beta1.swift │ │ │ ├── DeviceClaim+resource.v1beta1.swift │ │ │ ├── DeviceClaimConfiguration+resource.v1beta1.swift │ │ │ ├── DeviceClass+resource.v1beta1.swift │ │ │ ├── DeviceClassConfiguration+resource.v1beta1.swift │ │ │ ├── DeviceClassList+resource.v1beta1.swift │ │ │ ├── DeviceClassSpec+resource.v1beta1.swift │ │ │ ├── DeviceConstraint+resource.v1beta1.swift │ │ │ ├── DeviceRequest+resource.v1beta1.swift │ │ │ ├── DeviceRequestAllocationResult+resource.v1beta1.swift │ │ │ ├── DeviceSelector+resource.v1beta1.swift │ │ │ ├── NetworkDeviceData+resource.v1beta1.swift │ │ │ ├── OpaqueDeviceConfiguration+resource.v1beta1.swift │ │ │ ├── ResourceClaim+resource.v1beta1.swift │ │ │ ├── ResourceClaimConsumerReference+resource.v1beta1.swift │ │ │ ├── ResourceClaimList+resource.v1beta1.swift │ │ │ ├── ResourceClaimSpec+resource.v1beta1.swift │ │ │ ├── ResourceClaimStatus+resource.v1beta1.swift │ │ │ ├── ResourceClaimTemplate+resource.v1beta1.swift │ │ │ ├── ResourceClaimTemplateList+resource.v1beta1.swift │ │ │ ├── ResourceClaimTemplateSpec+resource.v1beta1.swift │ │ │ ├── ResourcePool+resource.v1beta1.swift │ │ │ ├── ResourceSlice+resource.v1beta1.swift │ │ │ ├── ResourceSliceList+resource.v1beta1.swift │ │ │ ├── ResourceSliceSpec+resource.v1beta1.swift │ │ │ └── resource+v1beta1.swift │ ├── scheduling │ │ ├── scheduling.swift │ │ └── v1 │ │ │ ├── PriorityClass+scheduling.v1.swift │ │ │ ├── PriorityClassList+scheduling.v1.swift │ │ │ └── scheduling+v1.swift │ ├── storage │ │ ├── storage.swift │ │ ├── v1 │ │ │ ├── CSIDriver+storage.v1.swift │ │ │ ├── CSIDriverList+storage.v1.swift │ │ │ ├── CSIDriverSpec+storage.v1.swift │ │ │ ├── CSINode+storage.v1.swift │ │ │ ├── CSINodeDriver+storage.v1.swift │ │ │ ├── CSINodeList+storage.v1.swift │ │ │ ├── CSINodeSpec+storage.v1.swift │ │ │ ├── CSIStorageCapacity+storage.v1.swift │ │ │ ├── CSIStorageCapacityList+storage.v1.swift │ │ │ ├── StorageClass+storage.v1.swift │ │ │ ├── StorageClassList+storage.v1.swift │ │ │ ├── TokenRequest+storage.v1.swift │ │ │ ├── VolumeAttachment+storage.v1.swift │ │ │ ├── VolumeAttachmentList+storage.v1.swift │ │ │ ├── VolumeAttachmentSource+storage.v1.swift │ │ │ ├── VolumeAttachmentSpec+storage.v1.swift │ │ │ ├── VolumeAttachmentStatus+storage.v1.swift │ │ │ ├── VolumeError+storage.v1.swift │ │ │ ├── VolumeNodeResources+storage.v1.swift │ │ │ └── storage+v1.swift │ │ ├── v1alpha1 │ │ │ ├── VolumeAttributesClass+storage.v1alpha1.swift │ │ │ ├── VolumeAttributesClassList+storage.v1alpha1.swift │ │ │ └── storage+v1alpha1.swift │ │ └── v1beta1 │ │ │ ├── VolumeAttributesClass+storage.v1beta1.swift │ │ │ ├── VolumeAttributesClassList+storage.v1beta1.swift │ │ │ └── storage+v1beta1.swift │ └── storagemigration │ │ ├── storagemigration.swift │ │ └── v1alpha1 │ │ ├── GroupVersionResource+storagemigration.v1alpha1.swift │ │ ├── MigrationCondition+storagemigration.v1alpha1.swift │ │ ├── StorageVersionMigration+storagemigration.v1alpha1.swift │ │ ├── StorageVersionMigrationList+storagemigration.v1alpha1.swift │ │ ├── StorageVersionMigrationSpec+storagemigration.v1alpha1.swift │ │ ├── StorageVersionMigrationStatus+storagemigration.v1alpha1.swift │ │ └── storagemigration+v1alpha1.swift └── SwiftkubeModel.swift ├── SwiftkubeModel.png └── Tests └── SwiftkubeModelTests ├── CronJobExtensionsTests.swift ├── GroupVersionKindTests.swift ├── HashesTests.swift ├── IntOrStringTests.swift ├── QuantityParse.swift ├── UnstructureResourceTests.swift └── UnstructuredResourceListTests.swift /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: "swiftkube-model-ci" 2 | 3 | on: 4 | push: 5 | branches: [ "main" ] 6 | pull_request: 7 | branches: [ "*" ] 8 | 9 | jobs: 10 | macOS: 11 | runs-on: macos-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2 15 | - name: Build 16 | run: swift build 17 | - name: Test 18 | run: swift test --enable-test-discovery 19 | linux: 20 | runs-on: ubuntu-latest 21 | strategy: 22 | matrix: 23 | image: ["swift:5.9", "swift:5.10", "swift:6.0"] 24 | container: ${{ matrix.image }} 25 | steps: 26 | - name: Checkout 27 | uses: actions/checkout@v2 28 | - name: Build 29 | run: swift build 30 | - name: Test 31 | run: swift test --enable-test-discovery 32 | iOS: 33 | name: Test iOS 34 | runs-on: macos-latest 35 | strategy: 36 | matrix: 37 | destination: 38 | - "platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro" 39 | - "platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro" 40 | steps: 41 | - name: Checkout 42 | uses: actions/checkout@v2 43 | - name: iOS - ${{ matrix.destination }} 44 | run: set -o pipefail && xcodebuild -scheme SwiftkubeModel -destination "${{ matrix.destination }}" clean test | xcpretty 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | .swiftpm 7 | /.idea 8 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version: 5.6 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "SwiftkubeModel", 8 | platforms: [ 9 | .macOS(.v10_13), .iOS(.v12), .tvOS(.v12), .watchOS(.v5) 10 | ], 11 | products: [ 12 | .library( 13 | name: "SwiftkubeModel", 14 | targets: ["SwiftkubeModel"] 15 | ), 16 | ], 17 | dependencies: [], 18 | targets: [ 19 | .target( 20 | name: "SwiftkubeModel", 21 | dependencies: [], 22 | path: "Sources" 23 | ), 24 | .testTarget( 25 | name: "SwiftkubeModelTests", 26 | dependencies: [ 27 | "SwiftkubeModel" 28 | ]), 29 | ], 30 | swiftLanguageVersions: [.v5, .version("6")] 31 | ) 32 | -------------------------------------------------------------------------------- /Sources/Builders/Builders.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | // MARK: - sk 20 | 21 | /// 22 | /// Public namespace for builder functions 23 | /// 24 | public enum sk {} 25 | 26 | @discardableResult 27 | func build(_ value: T, with block: (inout T) -> Void) -> T { 28 | var instance = value 29 | block(&instance) 30 | return instance 31 | } 32 | -------------------------------------------------------------------------------- /Sources/Builders/apps/v1/appsV1+Deployment.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func deployment(name: String, _ block: (inout apps.v1.Deployment) -> Void) -> apps.v1.Deployment { 22 | build(apps.v1.Deployment(metadata: meta.v1.ObjectMeta(name: name)), with: block) 23 | } 24 | 25 | static func deploymentSpec(_ block: (inout apps.v1.DeploymentSpec) -> Void) -> apps.v1.DeploymentSpec { 26 | build(apps.v1.DeploymentSpec(selector: meta.v1.LabelSelector(), template: core.v1.PodTemplateSpec()), with: block) 27 | } 28 | } 29 | 30 | public extension apps.v1.Deployment { 31 | 32 | mutating func expose(on servicePort: Int32, type: ServiceType = .clusterIP) -> core.v1.Service? { 33 | guard 34 | let name = name, 35 | var metadata = metadata, 36 | let containerPort = spec?.template.spec?.containers.first?.ports?.first?.containerPort 37 | else { 38 | return nil 39 | } 40 | 41 | if metadata.labels == nil { 42 | metadata.labels = ["app": name] 43 | } 44 | 45 | return sk.service { 46 | $0.metadata = sk.metadata { 47 | $0.name = name 48 | } 49 | $0.spec = sk.serviceSpec { 50 | $0.type = type.rawValue 51 | $0.selector = metadata.labels 52 | $0.serve(port: servicePort, targetPort: IntOrString(integerLiteral: Int(containerPort))) 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+ConfigMap.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func configMap(name: String, _ block: ((inout core.v1.ConfigMap) -> Void)? = nil) -> core.v1.ConfigMap { 22 | build(core.v1.ConfigMap(metadata: meta.v1.ObjectMeta(name: name)), with: block ?? { _ in }) 23 | } 24 | } 25 | 26 | public extension core.v1.ConfigMap { 27 | 28 | mutating func add(data: String, forKey key: String) { 29 | if self.data == nil { 30 | self.data = [:] 31 | } 32 | self.data?[key] = data 33 | } 34 | 35 | mutating func add(binaryData: Data, forKey key: String) { 36 | if self.binaryData == nil { 37 | self.binaryData = [:] 38 | } 39 | self.binaryData?[key] = binaryData.base64EncodedString() 40 | } 41 | 42 | mutating func add(file: URL, forKey key: String) throws { 43 | if data == nil { 44 | data = [:] 45 | } 46 | 47 | data?[key] = try String(contentsOf: file, encoding: .utf8) 48 | } 49 | 50 | mutating func add(binaryFile: URL, forKey key: String) throws { 51 | if binaryData == nil { 52 | binaryData = [:] 53 | } 54 | binaryData?[key] = try Data(contentsOf: binaryFile).base64EncodedString() 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+Namespace.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func namespace(_ block: (inout core.v1.Namespace) -> Void) -> core.v1.Namespace { 22 | build(core.v1.Namespace(), with: block) 23 | } 24 | 25 | static func namespaceSpec(_ block: (inout core.v1.NamespaceSpec) -> Void) -> core.v1.NamespaceSpec { 26 | build(core.v1.NamespaceSpec(), with: block) 27 | } 28 | } 29 | 30 | public extension core.v1.Namespace { 31 | 32 | mutating func add(finalizer: String) { 33 | if spec == nil { 34 | spec = core.v1.NamespaceSpec() 35 | spec?.finalizers = [] 36 | } 37 | spec?.finalizers?.append(finalizer) 38 | } 39 | 40 | mutating func remove(finalizer: String) { 41 | spec?.finalizers?.removeAll(where: { $0 == finalizer }) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+Node.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func node(_ block: (inout core.v1.Node) -> Void) -> core.v1.Node { 22 | build(core.v1.Node(), with: block) 23 | } 24 | 25 | static func node(name: String, _ block: ((inout core.v1.Node) -> Void)? = nil) -> core.v1.Node { 26 | build(core.v1.Node(metadata: meta.v1.ObjectMeta(name: name)), with: block ?? { _ in }) 27 | } 28 | 29 | static func nodeSpec(_ block: (inout core.v1.NodeSpec) -> Void) -> core.v1.NodeSpec { 30 | build(core.v1.NodeSpec(), with: block) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+ObjectReference.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func localObjectReference(name: String) -> core.v1.LocalObjectReference { 22 | core.v1.LocalObjectReference(name: name) 23 | } 24 | 25 | static func objectReference(gvk: GroupVersionKind, _ block: (inout core.v1.ObjectReference) -> Void) -> core.v1.ObjectReference { 26 | build(core.v1.ObjectReference(apiVersion: gvk.apiVersion, kind: gvk.kind), with: block) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+Pod.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func pod(_ block: (inout core.v1.Pod) -> Void) -> core.v1.Pod { 22 | build(core.v1.Pod(), with: block) 23 | } 24 | 25 | static func pod(name: String, _ block: ((inout core.v1.Pod) -> Void)? = nil) -> core.v1.Pod { 26 | build(core.v1.Pod(metadata: meta.v1.ObjectMeta(name: name)), with: block ?? { _ in }) 27 | } 28 | 29 | static func podSpec(_ block: (inout core.v1.PodSpec) -> Void) -> core.v1.PodSpec { 30 | build(core.v1.PodSpec(containers: []), with: block) 31 | } 32 | 33 | static func podTemplate(_ block: (inout core.v1.PodTemplateSpec) -> Void) -> core.v1.PodTemplateSpec { 34 | build(core.v1.PodTemplateSpec(), with: block) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+Secret.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func secret(_ block: (inout core.v1.Secret) -> Void) -> core.v1.Secret { 22 | build(core.v1.Secret(), with: block) 23 | } 24 | } 25 | 26 | public extension core.v1.Secret { 27 | 28 | mutating func add(data: String, forKey key: String) { 29 | if self.data == nil { 30 | self.data = [:] 31 | } 32 | self.data?[key] = Data(data.utf8).base64EncodedString() 33 | } 34 | 35 | mutating func add(file: URL, forKey key: String) throws { 36 | if data == nil { 37 | data = [:] 38 | } 39 | 40 | data?[key] = try Data(contentsOf: file).base64EncodedString() 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+Service.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func service(_ block: (inout core.v1.Service) -> Void) -> core.v1.Service { 22 | build(core.v1.Service(), with: block) 23 | } 24 | 25 | static func serviceSpec(_ block: (inout core.v1.ServiceSpec) -> Void) -> core.v1.ServiceSpec { 26 | build(core.v1.ServiceSpec(), with: block) 27 | } 28 | 29 | static func servicePort(_ port: Int32, _ block: ((inout core.v1.ServicePort) -> Void)? = nil) -> core.v1.ServicePort { 30 | build(core.v1.ServicePort(port: port), with: block ?? { _ in }) 31 | } 32 | } 33 | 34 | // MARK: - ServiceType 35 | 36 | public enum ServiceType: String { 37 | case clusterIP = "ClusterIP" 38 | case nodePort = "NodePort" 39 | case loadBalancer = "LoadBalancer" 40 | case externalName = "ExternalName" 41 | } 42 | 43 | public extension core.v1.ServiceSpec { 44 | 45 | mutating func serve(port servicePort: Int32, targetPort: IntOrString) { 46 | if ports == nil { 47 | ports = [] 48 | } 49 | ports?.append(sk.servicePort(servicePort) { 50 | $0.targetPort = targetPort 51 | }) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Sources/Builders/core/v1/coreV1+ServiceAccount.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func serviceAccount(_ block: (inout core.v1.ServiceAccount) -> Void) -> core.v1.ServiceAccount { 22 | build(core.v1.ServiceAccount(), with: block) 23 | } 24 | } 25 | 26 | public extension core.v1.ServiceAccount { 27 | 28 | mutating func use(imagePullSecret name: String) { 29 | if imagePullSecrets == nil { 30 | imagePullSecrets = [] 31 | } 32 | imagePullSecrets?.append(sk.localObjectReference(name: name)) 33 | } 34 | 35 | mutating func use(secret name: String, namespace: String? = nil) { 36 | if secrets == nil { 37 | secrets = [] 38 | } 39 | secrets?.append(sk.objectReference(gvk: .coreV1Secret) { 40 | $0.namespace = namespace ?? self.metadata?.namespace 41 | $0.name = name 42 | }) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Sources/Builders/meta/v1/metaV1+Metadata.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func metadata(_ block: (inout meta.v1.ObjectMeta) -> Void) -> meta.v1.ObjectMeta { 22 | build(meta.v1.ObjectMeta(), with: block) 23 | } 24 | 25 | static func metadata(name: String, _ block: ((inout meta.v1.ObjectMeta) -> Void)? = nil) -> meta.v1.ObjectMeta { 26 | build(meta.v1.ObjectMeta(name: name), with: block ?? { _ in }) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Sources/Builders/meta/v1/metaV1+Status.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension sk { 20 | 21 | static func status(_ block: (inout meta.v1.Status) -> Void) -> meta.v1.Status { 22 | build(meta.v1.Status(), with: block) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Sources/Extensions/CronJobExtensions+batch.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | public extension batch.v1.CronJob { 20 | func generateJob(withName name: String = "manual") throws -> batch.v1.Job { 21 | guard let jobTemplateSpec = spec?.jobTemplate.spec else { throw SwiftkubeModelError.fieldDoesntExist("Job spec") } 22 | guard let cronJobName = self.name else { throw SwiftkubeModelError.fieldDoesntExist("Cronjob Name") } 23 | let jobName = "\(cronJobName)-\(name)-\(GenerateRandomHash(length: 3))" 24 | guard let metadata = metadata else { throw SwiftkubeModelError.fieldDoesntExist("Job Metadata") } 25 | var existingMetadata = metadata 26 | existingMetadata.name = jobName 27 | var job = batch.v1.Job() 28 | existingMetadata.resourceVersion = nil 29 | job.spec = jobTemplateSpec 30 | job.metadata = existingMetadata 31 | return job 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Sources/Extensions/Hashes.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | /// GenerateRandomHash returns a three character. I 20 | func GenerateRandomHash(length: Int) -> String { 21 | if length == 0 { 22 | return "" 23 | } 24 | // We omit vowels from the set of available characters to reduce the chances 25 | // of "bad words" being formed. 26 | let alphanums = ["b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z", "2", "4", "5", "6", "7", "8", "9"] 27 | var seedAlphanum = alphanums.randomElement()! 28 | var slug = seedAlphanum 29 | var neededAlphanums = length - 1 30 | while neededAlphanums > 0 { 31 | let nextAlphanum = alphanums.randomElement()! 32 | if nextAlphanum != seedAlphanum { 33 | seedAlphanum = nextAlphanum 34 | slug = slug + nextAlphanum 35 | neededAlphanums -= 1 36 | } 37 | } 38 | return slug 39 | } 40 | -------------------------------------------------------------------------------- /Sources/Model/IntOrString.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | // MARK: - IntOrString 20 | 21 | /// A type that can hold an `Integer` or a `String`. 22 | /// 23 | /// When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the 24 | /// inner type. This allows you to have, for example, a JSON field that can accept a name or number. 25 | public struct IntOrString: ExpressibleByStringLiteral, ExpressibleByIntegerLiteral, Hashable, Sendable { 26 | 27 | private let value: String 28 | 29 | /// `true` if the inner value represents an `Integer`, `false` otherwise. 30 | var isInt: Bool { 31 | Int(value) != nil 32 | } 33 | 34 | public init(stringLiteral value: String) { 35 | self.value = value 36 | } 37 | 38 | public init(integerLiteral value: Int) { 39 | self.value = String(value) 40 | } 41 | } 42 | 43 | // MARK: Codable 44 | 45 | /// 46 | /// Codable conformance. 47 | /// 48 | extension IntOrString: Codable { 49 | 50 | public init(from decoder: Decoder) throws { 51 | if let value = try? decoder.singleValueContainer().decode(String.self) { 52 | self.value = value 53 | } else { 54 | let value = try decoder.singleValueContainer().decode(Int.self) 55 | self.value = String(value) 56 | } 57 | } 58 | 59 | public func encode(to encoder: Encoder) throws { 60 | var container = encoder.singleValueContainer() 61 | if let intValue = Int(value) { 62 | try container.encode(intValue) 63 | } else { 64 | try container.encode(value) 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Sources/Model/admissionregistration/admissionregistration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `admissionregistration` 26 | /// 27 | public enum admissionregistration {} 28 | -------------------------------------------------------------------------------- /Sources/Model/admissionregistration/v1/TypeChecking+admissionregistration.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// admissionregistration.v1.TypeChecking 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - admissionregistration.v1.TypeChecking 26 | 27 | public extension admissionregistration.v1 { 28 | 29 | /// 30 | /// TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy 31 | /// 32 | struct TypeChecking: KubernetesResource { 33 | /// 34 | /// The type checking warnings for each expression. 35 | /// 36 | public var expressionWarnings: [admissionregistration.v1.ExpressionWarning]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | expressionWarnings: [admissionregistration.v1.ExpressionWarning]? = nil 42 | ) { 43 | self.expressionWarnings = expressionWarnings 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension admissionregistration.v1.TypeChecking { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case expressionWarnings = "expressionWarnings" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.expressionWarnings = try container.decodeIfPresent([admissionregistration.v1.ExpressionWarning].self, forKey: .expressionWarnings) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(expressionWarnings, forKey: .expressionWarnings) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/admissionregistration/v1/admissionregistration+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `admissionregistration.v1` 26 | /// 27 | public extension admissionregistration { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/admissionregistration/v1alpha1/admissionregistration+v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `admissionregistration.v1alpha1` 26 | /// 27 | public extension admissionregistration { 28 | enum v1alpha1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/admissionregistration/v1beta1/admissionregistration+v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `admissionregistration.v1beta1` 26 | /// 27 | public extension admissionregistration { 28 | enum v1beta1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/apiextensions/apiextensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apiextensions` 26 | /// 27 | public enum apiextensions {} 28 | -------------------------------------------------------------------------------- /Sources/Model/apiextensions/v1/CustomResourceSubresourceStatus+apiextensions.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// apiextensions.v1.CustomResourceSubresourceStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - apiextensions.v1.CustomResourceSubresourceStatus 26 | 27 | public extension apiextensions.v1 { 28 | 29 | /// 30 | /// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza 31 | /// 32 | struct CustomResourceSubresourceStatus: KubernetesResource { 33 | /// 34 | /// Default memberwise initializer 35 | /// 36 | public init( 37 | ) { 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/Model/apiextensions/v1/CustomResourceValidation+apiextensions.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// apiextensions.v1.CustomResourceValidation 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - apiextensions.v1.CustomResourceValidation 26 | 27 | public extension apiextensions.v1 { 28 | 29 | /// 30 | /// CustomResourceValidation is a list of validation methods for CustomResources. 31 | /// 32 | struct CustomResourceValidation: KubernetesResource { 33 | /// 34 | /// openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. 35 | /// 36 | public var openAPIV3Schema: JSONObject? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | openAPIV3Schema: JSONObject? = nil 42 | ) { 43 | self.openAPIV3Schema = openAPIV3Schema 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension apiextensions.v1.CustomResourceValidation { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case openAPIV3Schema = "openAPIV3Schema" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.openAPIV3Schema = try container.decodeIfPresent(JSONObject.self, forKey: .openAPIV3Schema) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(openAPIV3Schema, forKey: .openAPIV3Schema) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/apiextensions/v1/apiextensions+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apiextensions.v1` 26 | /// 27 | public extension apiextensions { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/apiregistration/apiregistration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apiregistration` 26 | /// 27 | public enum apiregistration {} 28 | -------------------------------------------------------------------------------- /Sources/Model/apiregistration/v1/APIServiceStatus+apiregistration.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// apiregistration.v1.APIServiceStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - apiregistration.v1.APIServiceStatus 26 | 27 | public extension apiregistration.v1 { 28 | 29 | /// 30 | /// APIServiceStatus contains derived information about an API server 31 | /// 32 | struct APIServiceStatus: KubernetesResource { 33 | /// 34 | /// Current service state of apiService. 35 | /// 36 | public var conditions: [apiregistration.v1.APIServiceCondition]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | conditions: [apiregistration.v1.APIServiceCondition]? = nil 42 | ) { 43 | self.conditions = conditions 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension apiregistration.v1.APIServiceStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case conditions = "conditions" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.conditions = try container.decodeIfPresent([apiregistration.v1.APIServiceCondition].self, forKey: .conditions) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(conditions, forKey: .conditions) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/apiregistration/v1/apiregistration+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apiregistration.v1` 26 | /// 27 | public extension apiregistration { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/apps/apps.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apps` 26 | /// 27 | public enum apps {} 28 | -------------------------------------------------------------------------------- /Sources/Model/apps/v1/apps+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `apps.v1` 26 | /// 27 | public extension apps { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/authentication/authentication.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `authentication` 26 | /// 27 | public enum authentication {} 28 | -------------------------------------------------------------------------------- /Sources/Model/authentication/v1/SelfSubjectReviewStatus+authentication.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// authentication.v1.SelfSubjectReviewStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - authentication.v1.SelfSubjectReviewStatus 26 | 27 | public extension authentication.v1 { 28 | 29 | /// 30 | /// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. 31 | /// 32 | struct SelfSubjectReviewStatus: KubernetesResource { 33 | /// 34 | /// User attributes of the user making this request. 35 | /// 36 | public var userInfo: authentication.v1.UserInfo? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | userInfo: authentication.v1.UserInfo? = nil 42 | ) { 43 | self.userInfo = userInfo 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension authentication.v1.SelfSubjectReviewStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case userInfo = "userInfo" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.userInfo = try container.decodeIfPresent(authentication.v1.UserInfo.self, forKey: .userInfo) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(userInfo, forKey: .userInfo) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/authentication/v1/authentication+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `authentication.v1` 26 | /// 27 | public extension authentication { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/authentication/v1beta1/SelfSubjectReviewStatus+authentication.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// authentication.v1beta1.SelfSubjectReviewStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - authentication.v1beta1.SelfSubjectReviewStatus 26 | 27 | public extension authentication.v1beta1 { 28 | 29 | /// 30 | /// SelfSubjectReviewStatus is filled by the kube-apiserver and sent back to a user. 31 | /// 32 | struct SelfSubjectReviewStatus: KubernetesResource { 33 | /// 34 | /// User attributes of the user making this request. 35 | /// 36 | public var userInfo: authentication.v1.UserInfo? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | userInfo: authentication.v1.UserInfo? = nil 42 | ) { 43 | self.userInfo = userInfo 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension authentication.v1beta1.SelfSubjectReviewStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case userInfo = "userInfo" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.userInfo = try container.decodeIfPresent(authentication.v1.UserInfo.self, forKey: .userInfo) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(userInfo, forKey: .userInfo) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/authentication/v1beta1/authentication+v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `authentication.v1beta1` 26 | /// 27 | public extension authentication { 28 | enum v1beta1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/authorization/authorization.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `authorization` 26 | /// 27 | public enum authorization {} 28 | -------------------------------------------------------------------------------- /Sources/Model/authorization/v1/SelfSubjectRulesReviewSpec+authorization.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// authorization.v1.SelfSubjectRulesReviewSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - authorization.v1.SelfSubjectRulesReviewSpec 26 | 27 | public extension authorization.v1 { 28 | 29 | /// 30 | /// SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. 31 | /// 32 | struct SelfSubjectRulesReviewSpec: KubernetesResource { 33 | /// 34 | /// Namespace to evaluate rules for. Required. 35 | /// 36 | public var namespace: String? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | namespace: String? = nil 42 | ) { 43 | self.namespace = namespace 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension authorization.v1.SelfSubjectRulesReviewSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case namespace = "namespace" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.namespace = try container.decodeIfPresent(String.self, forKey: .namespace) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(namespace, forKey: .namespace) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/authorization/v1/authorization+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `authorization.v1` 26 | /// 27 | public extension authorization { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/autoscaling/autoscaling.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `autoscaling` 26 | /// 27 | public enum autoscaling {} 28 | -------------------------------------------------------------------------------- /Sources/Model/autoscaling/v1/ScaleSpec+autoscaling.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// autoscaling.v1.ScaleSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - autoscaling.v1.ScaleSpec 26 | 27 | public extension autoscaling.v1 { 28 | 29 | /// 30 | /// ScaleSpec describes the attributes of a scale subresource. 31 | /// 32 | struct ScaleSpec: KubernetesResource { 33 | /// 34 | /// replicas is the desired number of instances for the scaled object. 35 | /// 36 | public var replicas: Int32? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | replicas: Int32? = nil 42 | ) { 43 | self.replicas = replicas 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension autoscaling.v1.ScaleSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case replicas = "replicas" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.replicas = try container.decodeIfPresent(Int32.self, forKey: .replicas) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(replicas, forKey: .replicas) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/autoscaling/v1/autoscaling+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `autoscaling.v1` 26 | /// 27 | public extension autoscaling { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/autoscaling/v2/autoscaling+v2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `autoscaling.v2` 26 | /// 27 | public extension autoscaling { 28 | enum v2 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/batch/batch.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `batch` 26 | /// 27 | public enum batch {} 28 | -------------------------------------------------------------------------------- /Sources/Model/batch/v1/PodFailurePolicy+batch.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// batch.v1.PodFailurePolicy 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - batch.v1.PodFailurePolicy 26 | 27 | public extension batch.v1 { 28 | 29 | /// 30 | /// PodFailurePolicy describes how failed pods influence the backoffLimit. 31 | /// 32 | struct PodFailurePolicy: KubernetesResource { 33 | /// 34 | /// A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed. 35 | /// 36 | public var rules: [batch.v1.PodFailurePolicyRule] 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | rules: [batch.v1.PodFailurePolicyRule] 42 | ) { 43 | self.rules = rules 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension batch.v1.PodFailurePolicy { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case rules = "rules" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.rules = try container.decode([batch.v1.PodFailurePolicyRule].self, forKey: .rules) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(rules, forKey: .rules) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/batch/v1/batch+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `batch.v1` 26 | /// 27 | public extension batch { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/certificates/certificates.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `certificates` 26 | /// 27 | public enum certificates {} 28 | -------------------------------------------------------------------------------- /Sources/Model/certificates/v1/certificates+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `certificates.v1` 26 | /// 27 | public extension certificates { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/certificates/v1alpha1/certificates+v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `certificates.v1alpha1` 26 | /// 27 | public extension certificates { 28 | enum v1alpha1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/coordination/coordination.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `coordination` 26 | /// 27 | public enum coordination {} 28 | -------------------------------------------------------------------------------- /Sources/Model/coordination/v1/coordination+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `coordination.v1` 26 | /// 27 | public extension coordination { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/coordination/v1alpha2/coordination+v1alpha2.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `coordination.v1alpha2` 26 | /// 27 | public extension coordination { 28 | enum v1alpha2 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/core/core.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `core` 26 | /// 27 | public enum core {} 28 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/AttachedVolume+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.AttachedVolume 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.AttachedVolume 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// AttachedVolume describes a volume attached to a node 31 | /// 32 | struct AttachedVolume: KubernetesResource { 33 | /// 34 | /// DevicePath represents the device path where the volume should be available 35 | /// 36 | public var devicePath: String 37 | /// 38 | /// Name of the attached volume 39 | /// 40 | public var name: String 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | devicePath: String, 46 | name: String 47 | ) { 48 | self.devicePath = devicePath 49 | self.name = name 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.AttachedVolume { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case devicePath = "devicePath" 62 | case name = "name" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.devicePath = try container.decode(String.self, forKey: .devicePath) 68 | self.name = try container.decode(String.self, forKey: .name) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(devicePath, forKey: .devicePath) 75 | try encodingContainer.encode(name, forKey: .name) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/Capabilities+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.Capabilities 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.Capabilities 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// Adds and removes POSIX capabilities from running containers. 31 | /// 32 | struct Capabilities: KubernetesResource { 33 | /// 34 | /// Added capabilities 35 | /// 36 | public var add: [String]? 37 | /// 38 | /// Removed capabilities 39 | /// 40 | public var drop: [String]? 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | add: [String]? = nil, 46 | drop: [String]? = nil 47 | ) { 48 | self.add = add 49 | self.drop = drop 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.Capabilities { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case add = "add" 62 | case drop = "drop" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.add = try container.decodeIfPresent([String].self, forKey: .add) 68 | self.drop = try container.decodeIfPresent([String].self, forKey: .drop) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(add, forKey: .add) 75 | try encodingContainer.encode(drop, forKey: .drop) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/ClientIPConfig+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.ClientIPConfig 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.ClientIPConfig 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// ClientIPConfig represents the configurations of Client IP based session affinity. 31 | /// 32 | struct ClientIPConfig: KubernetesResource { 33 | /// 34 | /// timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). 35 | /// 36 | public var timeoutSeconds: Int32? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | timeoutSeconds: Int32? = nil 42 | ) { 43 | self.timeoutSeconds = timeoutSeconds 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.ClientIPConfig { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case timeoutSeconds = "timeoutSeconds" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.timeoutSeconds = try container.decodeIfPresent(Int32.self, forKey: .timeoutSeconds) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(timeoutSeconds, forKey: .timeoutSeconds) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/ContainerStateRunning+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.ContainerStateRunning 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.ContainerStateRunning 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// ContainerStateRunning is a running state of a container. 31 | /// 32 | struct ContainerStateRunning: KubernetesResource { 33 | /// 34 | /// Time at which the container was last (re-)started 35 | /// 36 | public var startedAt: Date? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | startedAt: Date? = nil 42 | ) { 43 | self.startedAt = startedAt 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.ContainerStateRunning { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case startedAt = "startedAt" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.startedAt = try container.decodeIfPresent(Date.self, forKey: .startedAt) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(startedAt, forKey: .startedAt) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/ContainerUser+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.ContainerUser 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.ContainerUser 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// ContainerUser represents user identity information 31 | /// 32 | struct ContainerUser: KubernetesResource { 33 | /// 34 | /// Linux holds user identity information initially attached to the first process of the containers in Linux. Note that the actual running identity can be changed if the process has enough privilege to do so. 35 | /// 36 | public var linux: core.v1.LinuxContainerUser? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | linux: core.v1.LinuxContainerUser? = nil 42 | ) { 43 | self.linux = linux 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.ContainerUser { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case linux = "linux" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.linux = try container.decodeIfPresent(core.v1.LinuxContainerUser.self, forKey: .linux) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(linux, forKey: .linux) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/DaemonEndpoint+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.DaemonEndpoint 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.DaemonEndpoint 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// DaemonEndpoint contains information about a single Daemon endpoint. 31 | /// 32 | struct DaemonEndpoint: KubernetesResource { 33 | /// 34 | /// Port number of the given endpoint. 35 | /// 36 | public var Port: Int32 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | Port: Int32 42 | ) { 43 | self.Port = Port 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.DaemonEndpoint { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case Port = "Port" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.Port = try container.decode(Int32.self, forKey: .Port) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(Port, forKey: .Port) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/DownwardAPIProjection+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.DownwardAPIProjection 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.DownwardAPIProjection 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. 31 | /// 32 | struct DownwardAPIProjection: KubernetesResource { 33 | /// 34 | /// Items is a list of DownwardAPIVolume file 35 | /// 36 | public var items: [core.v1.DownwardAPIVolumeFile]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | items: [core.v1.DownwardAPIVolumeFile]? = nil 42 | ) { 43 | self.items = items 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.DownwardAPIProjection { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case items = "items" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.items = try container.decodeIfPresent([core.v1.DownwardAPIVolumeFile].self, forKey: .items) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(items, forKey: .items) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/EventSource+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.EventSource 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.EventSource 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// EventSource contains information for an event. 31 | /// 32 | struct EventSource: KubernetesResource { 33 | /// 34 | /// Component from which the event is generated. 35 | /// 36 | public var component: String? 37 | /// 38 | /// Node name on which the event is generated. 39 | /// 40 | public var host: String? 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | component: String? = nil, 46 | host: String? = nil 47 | ) { 48 | self.component = component 49 | self.host = host 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.EventSource { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case component = "component" 62 | case host = "host" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.component = try container.decodeIfPresent(String.self, forKey: .component) 68 | self.host = try container.decodeIfPresent(String.self, forKey: .host) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(component, forKey: .component) 75 | try encodingContainer.encode(host, forKey: .host) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/ExecAction+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.ExecAction 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.ExecAction 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// ExecAction describes a "run in container" action. 31 | /// 32 | struct ExecAction: KubernetesResource { 33 | /// 34 | /// Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. 35 | /// 36 | public var command: [String]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | command: [String]? = nil 42 | ) { 43 | self.command = command 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.ExecAction { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case command = "command" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.command = try container.decodeIfPresent([String].self, forKey: .command) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(command, forKey: .command) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/HTTPHeader+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.HTTPHeader 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.HTTPHeader 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// HTTPHeader describes a custom header to be used in HTTP probes 31 | /// 32 | struct HTTPHeader: KubernetesResource { 33 | /// 34 | /// The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. 35 | /// 36 | public var name: String 37 | /// 38 | /// The header field value 39 | /// 40 | public var value: String 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | name: String, 46 | value: String 47 | ) { 48 | self.name = name 49 | self.value = value 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.HTTPHeader { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case name = "name" 62 | case value = "value" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.name = try container.decode(String.self, forKey: .name) 68 | self.value = try container.decode(String.self, forKey: .value) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(name, forKey: .name) 75 | try encodingContainer.encode(value, forKey: .value) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/HostAlias+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.HostAlias 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.HostAlias 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. 31 | /// 32 | struct HostAlias: KubernetesResource { 33 | /// 34 | /// Hostnames for the above IP address. 35 | /// 36 | public var hostnames: [String]? 37 | /// 38 | /// IP address of the host file entry. 39 | /// 40 | public var ip: String 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | hostnames: [String]? = nil, 46 | ip: String 47 | ) { 48 | self.hostnames = hostnames 49 | self.ip = ip 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.HostAlias { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case hostnames = "hostnames" 62 | case ip = "ip" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.hostnames = try container.decodeIfPresent([String].self, forKey: .hostnames) 68 | self.ip = try container.decode(String.self, forKey: .ip) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(hostnames, forKey: .hostnames) 75 | try encodingContainer.encode(ip, forKey: .ip) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/HostIP+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.HostIP 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.HostIP 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// HostIP represents a single IP address allocated to the host. 31 | /// 32 | struct HostIP: KubernetesResource { 33 | /// 34 | /// IP is the IP address assigned to the host 35 | /// 36 | public var ip: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | ip: String 42 | ) { 43 | self.ip = ip 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.HostIP { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case ip = "ip" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.ip = try container.decode(String.self, forKey: .ip) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(ip, forKey: .ip) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/LimitRangeSpec+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.LimitRangeSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.LimitRangeSpec 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// LimitRangeSpec defines a min/max usage limit for resources that match on kind. 31 | /// 32 | struct LimitRangeSpec: KubernetesResource { 33 | /// 34 | /// Limits is the list of LimitRangeItem objects that are enforced. 35 | /// 36 | public var limits: [core.v1.LimitRangeItem] 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | limits: [core.v1.LimitRangeItem] 42 | ) { 43 | self.limits = limits 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.LimitRangeSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case limits = "limits" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.limits = try container.decode([core.v1.LimitRangeItem].self, forKey: .limits) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(limits, forKey: .limits) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/LoadBalancerStatus+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.LoadBalancerStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.LoadBalancerStatus 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// LoadBalancerStatus represents the status of a load-balancer. 31 | /// 32 | struct LoadBalancerStatus: KubernetesResource { 33 | /// 34 | /// Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. 35 | /// 36 | public var ingress: [core.v1.LoadBalancerIngress]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | ingress: [core.v1.LoadBalancerIngress]? = nil 42 | ) { 43 | self.ingress = ingress 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.LoadBalancerStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case ingress = "ingress" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.ingress = try container.decodeIfPresent([core.v1.LoadBalancerIngress].self, forKey: .ingress) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(ingress, forKey: .ingress) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/LocalObjectReference+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.LocalObjectReference 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.LocalObjectReference 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. 31 | /// 32 | struct LocalObjectReference: KubernetesResource { 33 | /// 34 | /// Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 35 | /// 36 | public var name: String? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String? = nil 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.LocalObjectReference { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decodeIfPresent(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/NamespaceSpec+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.NamespaceSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.NamespaceSpec 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// NamespaceSpec describes the attributes on a Namespace. 31 | /// 32 | struct NamespaceSpec: KubernetesResource { 33 | /// 34 | /// Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ 35 | /// 36 | public var finalizers: [String]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | finalizers: [String]? = nil 42 | ) { 43 | self.finalizers = finalizers 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.NamespaceSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case finalizers = "finalizers" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.finalizers = try container.decodeIfPresent([String].self, forKey: .finalizers) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(finalizers, forKey: .finalizers) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/NodeAddress+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.NodeAddress 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.NodeAddress 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// NodeAddress contains information for the node's address. 31 | /// 32 | struct NodeAddress: KubernetesResource { 33 | /// 34 | /// The node address. 35 | /// 36 | public var address: String 37 | /// 38 | /// Node address type, one of Hostname, ExternalIP or InternalIP. 39 | /// 40 | public var type: String 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | address: String, 46 | type: String 47 | ) { 48 | self.address = address 49 | self.type = type 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.NodeAddress { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case address = "address" 62 | case type = "type" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.address = try container.decode(String.self, forKey: .address) 68 | self.type = try container.decode(String.self, forKey: .type) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(address, forKey: .address) 75 | try encodingContainer.encode(type, forKey: .type) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/NodeConfigSource+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.NodeConfigSource 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.NodeConfigSource 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22 31 | /// 32 | struct NodeConfigSource: KubernetesResource { 33 | /// 34 | /// ConfigMap is a reference to a Node's ConfigMap 35 | /// 36 | public var configMap: core.v1.ConfigMapNodeConfigSource? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | configMap: core.v1.ConfigMapNodeConfigSource? = nil 42 | ) { 43 | self.configMap = configMap 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.NodeConfigSource { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case configMap = "configMap" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.configMap = try container.decodeIfPresent(core.v1.ConfigMapNodeConfigSource.self, forKey: .configMap) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(configMap, forKey: .configMap) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/NodeDaemonEndpoints+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.NodeDaemonEndpoints 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.NodeDaemonEndpoints 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// NodeDaemonEndpoints lists ports opened by daemons running on the Node. 31 | /// 32 | struct NodeDaemonEndpoints: KubernetesResource { 33 | /// 34 | /// Endpoint on which Kubelet is listening. 35 | /// 36 | public var kubeletEndpoint: core.v1.DaemonEndpoint? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | kubeletEndpoint: core.v1.DaemonEndpoint? = nil 42 | ) { 43 | self.kubeletEndpoint = kubeletEndpoint 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.NodeDaemonEndpoints { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case kubeletEndpoint = "kubeletEndpoint" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.kubeletEndpoint = try container.decodeIfPresent(core.v1.DaemonEndpoint.self, forKey: .kubeletEndpoint) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(kubeletEndpoint, forKey: .kubeletEndpoint) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/NodeSelector+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.NodeSelector 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.NodeSelector 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms. 31 | /// 32 | struct NodeSelector: KubernetesResource { 33 | /// 34 | /// Required. A list of node selector terms. The terms are ORed. 35 | /// 36 | public var nodeSelectorTerms: [core.v1.NodeSelectorTerm] 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | nodeSelectorTerms: [core.v1.NodeSelectorTerm] 42 | ) { 43 | self.nodeSelectorTerms = nodeSelectorTerms 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.NodeSelector { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case nodeSelectorTerms = "nodeSelectorTerms" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.nodeSelectorTerms = try container.decode([core.v1.NodeSelectorTerm].self, forKey: .nodeSelectorTerms) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(nodeSelectorTerms, forKey: .nodeSelectorTerms) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/PodDNSConfigOption+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.PodDNSConfigOption 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.PodDNSConfigOption 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// PodDNSConfigOption defines DNS resolver options of a pod. 31 | /// 32 | struct PodDNSConfigOption: KubernetesResource { 33 | /// 34 | /// Name is this DNS resolver option's name. Required. 35 | /// 36 | public var name: String? 37 | /// 38 | /// Value is this DNS resolver option's value. 39 | /// 40 | public var value: String? 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | name: String? = nil, 46 | value: String? = nil 47 | ) { 48 | self.name = name 49 | self.value = value 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.PodDNSConfigOption { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case name = "name" 62 | case value = "value" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.name = try container.decodeIfPresent(String.self, forKey: .name) 68 | self.value = try container.decodeIfPresent(String.self, forKey: .value) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(name, forKey: .name) 75 | try encodingContainer.encode(value, forKey: .value) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/PodIP+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.PodIP 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.PodIP 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// PodIP represents a single IP address allocated to the pod. 31 | /// 32 | struct PodIP: KubernetesResource { 33 | /// 34 | /// IP is the IP address assigned to the pod 35 | /// 36 | public var ip: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | ip: String 42 | ) { 43 | self.ip = ip 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.PodIP { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case ip = "ip" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.ip = try container.decode(String.self, forKey: .ip) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(ip, forKey: .ip) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/PodOS+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.PodOS 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.PodOS 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// PodOS defines the OS parameters of a pod. 31 | /// 32 | struct PodOS: KubernetesResource { 33 | /// 34 | /// Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.PodOS { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/PodReadinessGate+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.PodReadinessGate 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.PodReadinessGate 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// PodReadinessGate contains the reference to a pod condition 31 | /// 32 | struct PodReadinessGate: KubernetesResource { 33 | /// 34 | /// ConditionType refers to a condition in the pod's condition list with matching type. 35 | /// 36 | public var conditionType: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | conditionType: String 42 | ) { 43 | self.conditionType = conditionType 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.PodReadinessGate { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case conditionType = "conditionType" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.conditionType = try container.decode(String.self, forKey: .conditionType) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(conditionType, forKey: .conditionType) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/PodSchedulingGate+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.PodSchedulingGate 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.PodSchedulingGate 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// PodSchedulingGate is associated to a Pod to guard its scheduling. 31 | /// 32 | struct PodSchedulingGate: KubernetesResource { 33 | /// 34 | /// Name of the scheduling gate. Each scheduling gate must have a unique name field. 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.PodSchedulingGate { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/ScopeSelector+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.ScopeSelector 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.ScopeSelector 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. 31 | /// 32 | struct ScopeSelector: KubernetesResource { 33 | /// 34 | /// A list of scope selector requirements by scope of the resources. 35 | /// 36 | public var matchExpressions: [core.v1.ScopedResourceSelectorRequirement]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | matchExpressions: [core.v1.ScopedResourceSelectorRequirement]? = nil 42 | ) { 43 | self.matchExpressions = matchExpressions 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.ScopeSelector { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case matchExpressions = "matchExpressions" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.matchExpressions = try container.decodeIfPresent([core.v1.ScopedResourceSelectorRequirement].self, forKey: .matchExpressions) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(matchExpressions, forKey: .matchExpressions) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/SessionAffinityConfig+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.SessionAffinityConfig 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.SessionAffinityConfig 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// SessionAffinityConfig represents the configurations of session affinity. 31 | /// 32 | struct SessionAffinityConfig: KubernetesResource { 33 | /// 34 | /// clientIP contains the configurations of Client IP based session affinity. 35 | /// 36 | public var clientIP: core.v1.ClientIPConfig? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | clientIP: core.v1.ClientIPConfig? = nil 42 | ) { 43 | self.clientIP = clientIP 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.SessionAffinityConfig { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case clientIP = "clientIP" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.clientIP = try container.decodeIfPresent(core.v1.ClientIPConfig.self, forKey: .clientIP) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(clientIP, forKey: .clientIP) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/SleepAction+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.SleepAction 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.SleepAction 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// SleepAction describes a "sleep" action. 31 | /// 32 | struct SleepAction: KubernetesResource { 33 | /// 34 | /// Seconds is the number of seconds to sleep. 35 | /// 36 | public var seconds: Int64 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | seconds: Int64 42 | ) { 43 | self.seconds = seconds 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.SleepAction { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case seconds = "seconds" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.seconds = try container.decode(Int64.self, forKey: .seconds) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(seconds, forKey: .seconds) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/Sysctl+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.Sysctl 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.Sysctl 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// Sysctl defines a kernel parameter to be set 31 | /// 32 | struct Sysctl: KubernetesResource { 33 | /// 34 | /// Name of a property to set 35 | /// 36 | public var name: String 37 | /// 38 | /// Value of a property to set 39 | /// 40 | public var value: String 41 | /// 42 | /// Default memberwise initializer 43 | /// 44 | public init( 45 | name: String, 46 | value: String 47 | ) { 48 | self.name = name 49 | self.value = value 50 | } 51 | } 52 | } 53 | 54 | /// 55 | /// Codable conformance 56 | /// 57 | public extension core.v1.Sysctl { 58 | 59 | private enum CodingKeys: String, CodingKey { 60 | 61 | case name = "name" 62 | case value = "value" 63 | } 64 | 65 | init(from decoder: Decoder) throws { 66 | let container = try decoder.container(keyedBy: CodingKeys.self) 67 | self.name = try container.decode(String.self, forKey: .name) 68 | self.value = try container.decode(String.self, forKey: .value) 69 | } 70 | 71 | func encode(to encoder: Encoder) throws { 72 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 73 | 74 | try encodingContainer.encode(name, forKey: .name) 75 | try encodingContainer.encode(value, forKey: .value) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/VolumeNodeAffinity+core.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// core.v1.VolumeNodeAffinity 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - core.v1.VolumeNodeAffinity 26 | 27 | public extension core.v1 { 28 | 29 | /// 30 | /// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. 31 | /// 32 | struct VolumeNodeAffinity: KubernetesResource { 33 | /// 34 | /// required specifies hard node constraints that must be met. 35 | /// 36 | public var required: core.v1.NodeSelector? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | required: core.v1.NodeSelector? = nil 42 | ) { 43 | self.required = required 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension core.v1.VolumeNodeAffinity { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case required = "required" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.required = try container.decodeIfPresent(core.v1.NodeSelector.self, forKey: .required) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(required, forKey: .required) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/core/v1/core+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `core.v1` 26 | /// 27 | public extension core { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/discovery/discovery.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `discovery` 26 | /// 27 | public enum discovery {} 28 | -------------------------------------------------------------------------------- /Sources/Model/discovery/v1/EndpointHints+discovery.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// discovery.v1.EndpointHints 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - discovery.v1.EndpointHints 26 | 27 | public extension discovery.v1 { 28 | 29 | /// 30 | /// EndpointHints provides hints describing how an endpoint should be consumed. 31 | /// 32 | struct EndpointHints: KubernetesResource { 33 | /// 34 | /// forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. 35 | /// 36 | public var forZones: [discovery.v1.ForZone]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | forZones: [discovery.v1.ForZone]? = nil 42 | ) { 43 | self.forZones = forZones 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension discovery.v1.EndpointHints { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case forZones = "forZones" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.forZones = try container.decodeIfPresent([discovery.v1.ForZone].self, forKey: .forZones) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(forZones, forKey: .forZones) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/discovery/v1/ForZone+discovery.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// discovery.v1.ForZone 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - discovery.v1.ForZone 26 | 27 | public extension discovery.v1 { 28 | 29 | /// 30 | /// ForZone provides information about which zones should consume this endpoint. 31 | /// 32 | struct ForZone: KubernetesResource { 33 | /// 34 | /// name represents the name of the zone. 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension discovery.v1.ForZone { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/discovery/v1/discovery+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `discovery.v1` 26 | /// 27 | public extension discovery { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/events/events.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `events` 26 | /// 27 | public enum events {} 28 | -------------------------------------------------------------------------------- /Sources/Model/events/v1/events+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `events.v1` 26 | /// 27 | public extension events { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/flowcontrol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `flowcontrol` 26 | /// 27 | public enum flowcontrol {} 28 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/FlowDistinguisherMethod+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.FlowDistinguisherMethod 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.FlowDistinguisherMethod 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// FlowDistinguisherMethod specifies the method of a flow distinguisher. 31 | /// 32 | struct FlowDistinguisherMethod: KubernetesResource { 33 | /// 34 | /// `type` is the type of flow distinguisher method The supported types are "ByUser" and "ByNamespace". Required. 35 | /// 36 | public var type: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | type: String 42 | ) { 43 | self.type = type 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.FlowDistinguisherMethod { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case type = "type" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.type = try container.decode(String.self, forKey: .type) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(type, forKey: .type) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/FlowSchemaStatus+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.FlowSchemaStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.FlowSchemaStatus 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// FlowSchemaStatus represents the current state of a FlowSchema. 31 | /// 32 | struct FlowSchemaStatus: KubernetesResource { 33 | /// 34 | /// `conditions` is a list of the current states of FlowSchema. 35 | /// 36 | public var conditions: [flowcontrol.v1.FlowSchemaCondition]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | conditions: [flowcontrol.v1.FlowSchemaCondition]? = nil 42 | ) { 43 | self.conditions = conditions 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.FlowSchemaStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case conditions = "conditions" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.conditions = try container.decodeIfPresent([flowcontrol.v1.FlowSchemaCondition].self, forKey: .conditions) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(conditions, forKey: .conditions) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/GroupSubject+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.GroupSubject 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.GroupSubject 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// GroupSubject holds detailed information for group-kind subject. 31 | /// 32 | struct GroupSubject: KubernetesResource { 33 | /// 34 | /// name is the user group that matches, or "*" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required. 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.GroupSubject { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/PriorityLevelConfigurationReference+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.PriorityLevelConfigurationReference 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.PriorityLevelConfigurationReference 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. 31 | /// 32 | struct PriorityLevelConfigurationReference: KubernetesResource { 33 | /// 34 | /// `name` is the name of the priority level configuration being referenced Required. 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.PriorityLevelConfigurationReference { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/PriorityLevelConfigurationStatus+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.PriorityLevelConfigurationStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.PriorityLevelConfigurationStatus 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// PriorityLevelConfigurationStatus represents the current state of a "request-priority". 31 | /// 32 | struct PriorityLevelConfigurationStatus: KubernetesResource { 33 | /// 34 | /// `conditions` is the current state of "request-priority". 35 | /// 36 | public var conditions: [flowcontrol.v1.PriorityLevelConfigurationCondition]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | conditions: [flowcontrol.v1.PriorityLevelConfigurationCondition]? = nil 42 | ) { 43 | self.conditions = conditions 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.PriorityLevelConfigurationStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case conditions = "conditions" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.conditions = try container.decodeIfPresent([flowcontrol.v1.PriorityLevelConfigurationCondition].self, forKey: .conditions) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(conditions, forKey: .conditions) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/UserSubject+flowcontrol.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// flowcontrol.v1.UserSubject 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - flowcontrol.v1.UserSubject 26 | 27 | public extension flowcontrol.v1 { 28 | 29 | /// 30 | /// UserSubject holds detailed information for user-kind subject. 31 | /// 32 | struct UserSubject: KubernetesResource { 33 | /// 34 | /// `name` is the username that matches, or "*" to match all usernames. Required. 35 | /// 36 | public var name: String 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | name: String 42 | ) { 43 | self.name = name 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension flowcontrol.v1.UserSubject { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case name = "name" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.name = try container.decode(String.self, forKey: .name) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(name, forKey: .name) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/flowcontrol/v1/flowcontrol+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `flowcontrol.v1` 26 | /// 27 | public extension flowcontrol { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/internal/internal.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `internal` 26 | /// 27 | public enum `internal` {} 28 | -------------------------------------------------------------------------------- /Sources/Model/internal/v1alpha1/StorageVersionSpec+internal.v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// internal.v1alpha1.StorageVersionSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - `internal`.v1alpha1.StorageVersionSpec 26 | 27 | public extension `internal`.v1alpha1 { 28 | 29 | /// 30 | /// StorageVersionSpec is an empty spec. 31 | /// 32 | struct StorageVersionSpec: KubernetesResource { 33 | /// 34 | /// Default memberwise initializer 35 | /// 36 | public init( 37 | ) { 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Sources/Model/internal/v1alpha1/internal+v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `internal.v1alpha1` 26 | /// 27 | public extension `internal` { 28 | enum v1alpha1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/meta/meta.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `meta` 26 | /// 27 | public enum meta {} 28 | -------------------------------------------------------------------------------- /Sources/Model/meta/v1/meta+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `meta.v1` 26 | /// 27 | public extension meta { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/networking/networking.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `networking` 26 | /// 27 | public enum networking {} 28 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1/HTTPIngressRuleValue+networking.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1.HTTPIngressRuleValue 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1.HTTPIngressRuleValue 26 | 27 | public extension networking.v1 { 28 | 29 | /// 30 | /// HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. 31 | /// 32 | struct HTTPIngressRuleValue: KubernetesResource { 33 | /// 34 | /// paths is a collection of paths that map requests to backends. 35 | /// 36 | public var paths: [networking.v1.HTTPIngressPath] 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | paths: [networking.v1.HTTPIngressPath] 42 | ) { 43 | self.paths = paths 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1.HTTPIngressRuleValue { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case paths = "paths" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.paths = try container.decode([networking.v1.HTTPIngressPath].self, forKey: .paths) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(paths, forKey: .paths) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1/IngressLoadBalancerStatus+networking.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1.IngressLoadBalancerStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1.IngressLoadBalancerStatus 26 | 27 | public extension networking.v1 { 28 | 29 | /// 30 | /// IngressLoadBalancerStatus represents the status of a load-balancer. 31 | /// 32 | struct IngressLoadBalancerStatus: KubernetesResource { 33 | /// 34 | /// ingress is a list containing ingress points for the load-balancer. 35 | /// 36 | public var ingress: [networking.v1.IngressLoadBalancerIngress]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | ingress: [networking.v1.IngressLoadBalancerIngress]? = nil 42 | ) { 43 | self.ingress = ingress 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1.IngressLoadBalancerStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case ingress = "ingress" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.ingress = try container.decodeIfPresent([networking.v1.IngressLoadBalancerIngress].self, forKey: .ingress) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(ingress, forKey: .ingress) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1/IngressStatus+networking.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1.IngressStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1.IngressStatus 26 | 27 | public extension networking.v1 { 28 | 29 | /// 30 | /// IngressStatus describe the current state of the Ingress. 31 | /// 32 | struct IngressStatus: KubernetesResource { 33 | /// 34 | /// loadBalancer contains the current status of the load-balancer. 35 | /// 36 | public var loadBalancer: networking.v1.IngressLoadBalancerStatus? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | loadBalancer: networking.v1.IngressLoadBalancerStatus? = nil 42 | ) { 43 | self.loadBalancer = loadBalancer 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1.IngressStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case loadBalancer = "loadBalancer" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.loadBalancer = try container.decodeIfPresent(networking.v1.IngressLoadBalancerStatus.self, forKey: .loadBalancer) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(loadBalancer, forKey: .loadBalancer) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1/networking+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `networking.v1` 26 | /// 27 | public extension networking { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1beta1/IPAddressSpec+networking.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1beta1.IPAddressSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1beta1.IPAddressSpec 26 | 27 | public extension networking.v1beta1 { 28 | 29 | /// 30 | /// IPAddressSpec describe the attributes in an IP Address. 31 | /// 32 | struct IPAddressSpec: KubernetesResource { 33 | /// 34 | /// ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object. 35 | /// 36 | public var parentRef: networking.v1beta1.ParentReference 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | parentRef: networking.v1beta1.ParentReference 42 | ) { 43 | self.parentRef = parentRef 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1beta1.IPAddressSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case parentRef = "parentRef" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.parentRef = try container.decode(networking.v1beta1.ParentReference.self, forKey: .parentRef) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(parentRef, forKey: .parentRef) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1beta1/ServiceCIDRSpec+networking.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1beta1.ServiceCIDRSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1beta1.ServiceCIDRSpec 26 | 27 | public extension networking.v1beta1 { 28 | 29 | /// 30 | /// ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. 31 | /// 32 | struct ServiceCIDRSpec: KubernetesResource { 33 | /// 34 | /// CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable. 35 | /// 36 | public var cidrs: [String]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | cidrs: [String]? = nil 42 | ) { 43 | self.cidrs = cidrs 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1beta1.ServiceCIDRSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case cidrs = "cidrs" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.cidrs = try container.decodeIfPresent([String].self, forKey: .cidrs) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(cidrs, forKey: .cidrs) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1beta1/ServiceCIDRStatus+networking.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// networking.v1beta1.ServiceCIDRStatus 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - networking.v1beta1.ServiceCIDRStatus 26 | 27 | public extension networking.v1beta1 { 28 | 29 | /// 30 | /// ServiceCIDRStatus describes the current state of the ServiceCIDR. 31 | /// 32 | struct ServiceCIDRStatus: KubernetesResource { 33 | /// 34 | /// conditions holds an array of metav1.Condition that describe the state of the ServiceCIDR. Current service state 35 | /// 36 | public var conditions: [meta.v1.Condition]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | conditions: [meta.v1.Condition]? = nil 42 | ) { 43 | self.conditions = conditions 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension networking.v1beta1.ServiceCIDRStatus { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case conditions = "conditions" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.conditions = try container.decodeIfPresent([meta.v1.Condition].self, forKey: .conditions) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(conditions, forKey: .conditions) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/networking/v1beta1/networking+v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `networking.v1beta1` 26 | /// 27 | public extension networking { 28 | enum v1beta1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/node/node.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `node` 26 | /// 27 | public enum node {} 28 | -------------------------------------------------------------------------------- /Sources/Model/node/v1/Overhead+node.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// node.v1.Overhead 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - node.v1.Overhead 26 | 27 | public extension node.v1 { 28 | 29 | /// 30 | /// Overhead structure represents the resource overhead associated with running a pod. 31 | /// 32 | struct Overhead: KubernetesResource { 33 | /// 34 | /// podFixed represents the fixed resource overhead associated with running a pod. 35 | /// 36 | public var podFixed: [String: Quantity]? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | podFixed: [String: Quantity]? = nil 42 | ) { 43 | self.podFixed = podFixed 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension node.v1.Overhead { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case podFixed = "podFixed" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.podFixed = try container.decodeIfPresent([String: Quantity].self, forKey: .podFixed) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(podFixed, forKey: .podFixed) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/node/v1/node+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `node.v1` 26 | /// 27 | public extension node { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/policy/policy.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `policy` 26 | /// 27 | public enum policy {} 28 | -------------------------------------------------------------------------------- /Sources/Model/policy/v1/policy+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `policy.v1` 26 | /// 27 | public extension policy { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/rbac/rbac.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `rbac` 26 | /// 27 | public enum rbac {} 28 | -------------------------------------------------------------------------------- /Sources/Model/rbac/v1/rbac+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `rbac.v1` 26 | /// 27 | public extension rbac { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/resource/resource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `resource` 26 | /// 27 | public enum resource {} 28 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1alpha3/DeviceClassConfiguration+resource.v1alpha3.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1alpha3.DeviceClassConfiguration 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1alpha3.DeviceClassConfiguration 26 | 27 | public extension resource.v1alpha3 { 28 | 29 | /// 30 | /// DeviceClassConfiguration is used in DeviceClass. 31 | /// 32 | struct DeviceClassConfiguration: KubernetesResource { 33 | /// 34 | /// Opaque provides driver-specific configuration parameters. 35 | /// 36 | public var opaque: resource.v1alpha3.OpaqueDeviceConfiguration? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | opaque: resource.v1alpha3.OpaqueDeviceConfiguration? = nil 42 | ) { 43 | self.opaque = opaque 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1alpha3.DeviceClassConfiguration { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case opaque = "opaque" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.opaque = try container.decodeIfPresent(resource.v1alpha3.OpaqueDeviceConfiguration.self, forKey: .opaque) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(opaque, forKey: .opaque) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1alpha3/DeviceSelector+resource.v1alpha3.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1alpha3.DeviceSelector 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1alpha3.DeviceSelector 26 | 27 | public extension resource.v1alpha3 { 28 | 29 | /// 30 | /// DeviceSelector must have exactly one field set. 31 | /// 32 | struct DeviceSelector: KubernetesResource { 33 | /// 34 | /// CEL contains a CEL expression for selecting a device. 35 | /// 36 | public var cel: resource.v1alpha3.CELDeviceSelector? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | cel: resource.v1alpha3.CELDeviceSelector? = nil 42 | ) { 43 | self.cel = cel 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1alpha3.DeviceSelector { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case cel = "cel" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.cel = try container.decodeIfPresent(resource.v1alpha3.CELDeviceSelector.self, forKey: .cel) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(cel, forKey: .cel) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1alpha3/ResourceClaimSpec+resource.v1alpha3.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1alpha3.ResourceClaimSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1alpha3.ResourceClaimSpec 26 | 27 | public extension resource.v1alpha3 { 28 | 29 | /// 30 | /// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. 31 | /// 32 | struct ResourceClaimSpec: KubernetesResource { 33 | /// 34 | /// Devices defines how to request devices. 35 | /// 36 | public var devices: resource.v1alpha3.DeviceClaim? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | devices: resource.v1alpha3.DeviceClaim? = nil 42 | ) { 43 | self.devices = devices 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1alpha3.ResourceClaimSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case devices = "devices" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.devices = try container.decodeIfPresent(resource.v1alpha3.DeviceClaim.self, forKey: .devices) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(devices, forKey: .devices) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1alpha3/resource+v1alpha3.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `resource.v1alpha3` 26 | /// 27 | public extension resource { 28 | enum v1alpha3 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1beta1/DeviceCapacity+resource.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1beta1.DeviceCapacity 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1beta1.DeviceCapacity 26 | 27 | public extension resource.v1beta1 { 28 | 29 | /// 30 | /// DeviceCapacity describes a quantity associated with a device. 31 | /// 32 | struct DeviceCapacity: KubernetesResource { 33 | /// 34 | /// Value defines how much of a certain device capacity is available. 35 | /// 36 | public var value: Quantity 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | value: Quantity 42 | ) { 43 | self.value = value 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1beta1.DeviceCapacity { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case value = "value" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.value = try container.decode(Quantity.self, forKey: .value) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(value, forKey: .value) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1beta1/DeviceClassConfiguration+resource.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1beta1.DeviceClassConfiguration 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1beta1.DeviceClassConfiguration 26 | 27 | public extension resource.v1beta1 { 28 | 29 | /// 30 | /// DeviceClassConfiguration is used in DeviceClass. 31 | /// 32 | struct DeviceClassConfiguration: KubernetesResource { 33 | /// 34 | /// Opaque provides driver-specific configuration parameters. 35 | /// 36 | public var opaque: resource.v1beta1.OpaqueDeviceConfiguration? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | opaque: resource.v1beta1.OpaqueDeviceConfiguration? = nil 42 | ) { 43 | self.opaque = opaque 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1beta1.DeviceClassConfiguration { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case opaque = "opaque" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.opaque = try container.decodeIfPresent(resource.v1beta1.OpaqueDeviceConfiguration.self, forKey: .opaque) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(opaque, forKey: .opaque) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1beta1/DeviceSelector+resource.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1beta1.DeviceSelector 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1beta1.DeviceSelector 26 | 27 | public extension resource.v1beta1 { 28 | 29 | /// 30 | /// DeviceSelector must have exactly one field set. 31 | /// 32 | struct DeviceSelector: KubernetesResource { 33 | /// 34 | /// CEL contains a CEL expression for selecting a device. 35 | /// 36 | public var cel: resource.v1beta1.CELDeviceSelector? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | cel: resource.v1beta1.CELDeviceSelector? = nil 42 | ) { 43 | self.cel = cel 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1beta1.DeviceSelector { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case cel = "cel" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.cel = try container.decodeIfPresent(resource.v1beta1.CELDeviceSelector.self, forKey: .cel) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(cel, forKey: .cel) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1beta1/ResourceClaimSpec+resource.v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// resource.v1beta1.ResourceClaimSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - resource.v1beta1.ResourceClaimSpec 26 | 27 | public extension resource.v1beta1 { 28 | 29 | /// 30 | /// ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it. 31 | /// 32 | struct ResourceClaimSpec: KubernetesResource { 33 | /// 34 | /// Devices defines how to request devices. 35 | /// 36 | public var devices: resource.v1beta1.DeviceClaim? 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | devices: resource.v1beta1.DeviceClaim? = nil 42 | ) { 43 | self.devices = devices 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension resource.v1beta1.ResourceClaimSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case devices = "devices" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.devices = try container.decodeIfPresent(resource.v1beta1.DeviceClaim.self, forKey: .devices) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(devices, forKey: .devices) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/resource/v1beta1/resource+v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `resource.v1beta1` 26 | /// 27 | public extension resource { 28 | enum v1beta1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/scheduling/scheduling.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `scheduling` 26 | /// 27 | public enum scheduling {} 28 | -------------------------------------------------------------------------------- /Sources/Model/scheduling/v1/scheduling+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `scheduling.v1` 26 | /// 27 | public extension scheduling { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/storage/storage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storage` 26 | /// 27 | public enum storage {} 28 | -------------------------------------------------------------------------------- /Sources/Model/storage/v1/CSINodeSpec+storage.v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// storage.v1.CSINodeSpec 21 | /// 22 | 23 | import Foundation 24 | 25 | // MARK: - storage.v1.CSINodeSpec 26 | 27 | public extension storage.v1 { 28 | 29 | /// 30 | /// CSINodeSpec holds information about the specification of all CSI drivers installed on a node 31 | /// 32 | struct CSINodeSpec: KubernetesResource { 33 | /// 34 | /// drivers is a list of information of all CSI Drivers existing on a node. If all drivers in the list are uninstalled, this can become empty. 35 | /// 36 | public var drivers: [storage.v1.CSINodeDriver] 37 | /// 38 | /// Default memberwise initializer 39 | /// 40 | public init( 41 | drivers: [storage.v1.CSINodeDriver] 42 | ) { 43 | self.drivers = drivers 44 | } 45 | } 46 | } 47 | 48 | /// 49 | /// Codable conformance 50 | /// 51 | public extension storage.v1.CSINodeSpec { 52 | 53 | private enum CodingKeys: String, CodingKey { 54 | 55 | case drivers = "drivers" 56 | } 57 | 58 | init(from decoder: Decoder) throws { 59 | let container = try decoder.container(keyedBy: CodingKeys.self) 60 | self.drivers = try container.decode([storage.v1.CSINodeDriver].self, forKey: .drivers) 61 | } 62 | 63 | func encode(to encoder: Encoder) throws { 64 | var encodingContainer = encoder.container(keyedBy: CodingKeys.self) 65 | 66 | try encodingContainer.encode(drivers, forKey: .drivers) 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Sources/Model/storage/v1/storage+v1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storage.v1` 26 | /// 27 | public extension storage { 28 | enum v1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/storage/v1alpha1/storage+v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storage.v1alpha1` 26 | /// 27 | public extension storage { 28 | enum v1alpha1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/storage/v1beta1/storage+v1beta1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storage.v1beta1` 26 | /// 27 | public extension storage { 28 | enum v1beta1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/Model/storagemigration/storagemigration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storagemigration` 26 | /// 27 | public enum storagemigration {} 28 | -------------------------------------------------------------------------------- /Sources/Model/storagemigration/v1alpha1/storagemigration+v1alpha1.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | /// 18 | /// Generated by Swiftkube:ModelGen 19 | /// Kubernetes v1.32.2 20 | /// 21 | 22 | import Foundation 23 | 24 | /// 25 | /// Namespace for `storagemigration.v1alpha1` 26 | /// 27 | public extension storagemigration { 28 | enum v1alpha1 {} 29 | } 30 | -------------------------------------------------------------------------------- /Sources/SwiftkubeModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | import Foundation 18 | 19 | /// Represents SwiftkubeModel errors. 20 | public enum SwiftkubeModelError: Error { 21 | /// Thrown when dealing with an unknown Kubernetes object, i.e. when a corresponding `GroupVersionKind` cannot be determined. 22 | case unknownAPIObject(String) 23 | /// Thrown on decoding errors. 24 | case decodingError(String) 25 | /// Thrown when a Kubernetes object is missing a field that is required to perform an operation. 26 | case fieldDoesntExist(String) 27 | } 28 | -------------------------------------------------------------------------------- /SwiftkubeModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swiftkube/model/692a224fc1aad411deb2b616f361c4367c1d88a5/SwiftkubeModel.png -------------------------------------------------------------------------------- /Tests/SwiftkubeModelTests/CronJobExtensionsTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | @testable import SwiftkubeModel 18 | import XCTest 19 | 20 | private func dummyCronJob() -> batch.v1.CronJob { 21 | let jobTemplate = batch.v1.JobTemplateSpec(metadata: meta.v1.ObjectMeta(), spec: batch.v1.JobSpec(template: core.v1.PodTemplateSpec())) 22 | 23 | return batch.v1.CronJob(metadata: meta.v1.ObjectMeta( 24 | creationTimestamp: Date(), 25 | deletionGracePeriodSeconds: 100, 26 | managedFields: [meta.v1.ManagedFieldsEntry](), 27 | name: "great-cronjob", 28 | namespace: "default", 29 | ownerReferences: [meta.v1.OwnerReference](), 30 | resourceVersion: "appv1", 31 | uid: "F3493650-A9DF-410F-B1A4-E8F5386E5B53"), 32 | spec: batch.v1.CronJobSpec( 33 | failedJobsHistoryLimit: 5, 34 | jobTemplate: 35 | jobTemplate, 36 | schedule: "15 10 * * *", 37 | startingDeadlineSeconds: 100, 38 | successfulJobsHistoryLimit: 2, 39 | suspend: false 40 | ), 41 | status: batch.v1.CronJobStatus( 42 | active: [core.v1.ObjectReference](), 43 | lastScheduleTime: Date() 44 | ) 45 | ) 46 | } 47 | 48 | // MARK: - CronJobExtensionsTests 49 | 50 | final class CronJobExtensionsTests: XCTestCase { 51 | 52 | func testGetJobFromCronjob() throws { 53 | let exampleCronJob = dummyCronJob() 54 | let job = try exampleCronJob.generateJob() 55 | XCTAssertTrue((job.name?.starts(with: "great-cronjob-manual-")) != nil) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Tests/SwiftkubeModelTests/HashesTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | @testable import SwiftkubeModel 18 | import XCTest 19 | 20 | let exampleHash = GenerateRandomHash(length: 3) 21 | 22 | let exampleZeroLengthHash = GenerateRandomHash(length: 0) 23 | 24 | // MARK: - HashesTests 25 | 26 | final class HashesTests: XCTestCase { 27 | 28 | func testGenerateRandomHash() throws { 29 | 30 | XCTAssertEqual(exampleHash.count, 3) 31 | XCTAssertEqual(exampleZeroLengthHash.count, 0) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Tests/SwiftkubeModelTests/IntOrStringTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2020 Swiftkube Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | @testable import SwiftkubeModel 18 | import XCTest 19 | 20 | // MARK: - IntOrStringTest 21 | 22 | struct IntOrStringTest { 23 | let str: String 24 | let json: String 25 | let isInt: Bool 26 | } 27 | 28 | let intOrStringsArr: [IntOrStringTest] = [ 29 | .init(str: "80", json: "80", isInt: true), 30 | .init(str: "abc", json: "\"abc\"", isInt: false) 31 | ] 32 | 33 | 34 | // MARK: - IntOrStringTests 35 | 36 | final class IntOrStringTests: XCTestCase { 37 | 38 | func testIntOrString() throws { 39 | 40 | for t in intOrStringsArr { 41 | 42 | let v = IntOrString(stringLiteral: t.str) 43 | let encoder = JSONEncoder() 44 | let jsonValue = String(data: try encoder.encode(v), encoding: .utf8) 45 | 46 | XCTAssertEqual(v.isInt, t.isInt) 47 | XCTAssertEqual(jsonValue, t.json) 48 | } 49 | } 50 | } 51 | --------------------------------------------------------------------------------